
// this is autogenerated file, do not edit it.
#include "ficus/ficus.h"

struct _fx_Nt10Hashset__t1S_data_t;

static void _fx_free_Nt10Hashset__t1S(struct _fx_Nt10Hashset__t1S_data_t** dst);

struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t;

static void _fx_free_Nt10Hashset__t1R9Ast__id_t(struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t** dst);

struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t;

static void _fx_free_Nt11Set__tree_t1R9Ast__id_t(struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t** dst);

struct _fx_N13Ast__binary_t_data_t;

static void _fx_free_N13Ast__binary_t(struct _fx_N13Ast__binary_t_data_t** dst);

struct _fx_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t;

static void _fx_free_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t(
   struct _fx_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t** dst);

struct _fx_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t_data_t;

static void _fx_free_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t(
   struct _fx_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t_data_t** dst);

struct _fx_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t;

static void _fx_free_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t(
   struct _fx_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t** dst);

struct _fx_N14K_form__ktyp_t_data_t;

static void _fx_free_N14K_form__ktyp_t(struct _fx_N14K_form__ktyp_t_data_t** dst);

struct _fx_N14K_form__kexp_t_data_t;

static void _fx_free_N14K_form__kexp_t(struct _fx_N14K_form__kexp_t_data_t** dst);

struct _fx_Nt6option1FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t_data_t;

static void _fx_free_Nt6option1FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t(
   struct _fx_Nt6option1FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t_data_t** dst);

struct _fx_Nt6option1FPv2N14C_form__cexp_tR22C_form__c_fold_callb_t_data_t;

static void _fx_free_Nt6option1FPv2N14C_form__cexp_tR22C_form__c_fold_callb_t(
   struct _fx_Nt6option1FPv2N14C_form__cexp_tR22C_form__c_fold_callb_t_data_t** dst);

struct _fx_Nt6option1FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t_data_t;

static void _fx_free_Nt6option1FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t(
   struct _fx_Nt6option1FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t_data_t** dst);

struct _fx_Nt6option1FPv2R9Ast__id_tR22C_form__c_fold_callb_t_data_t;

static void _fx_free_Nt6option1FPv2R9Ast__id_tR22C_form__c_fold_callb_t(
   struct _fx_Nt6option1FPv2R9Ast__id_tR22C_form__c_fold_callb_t_data_t** dst);

struct _fx_N14C_form__ctyp_t_data_t;

static void _fx_free_N14C_form__ctyp_t(struct _fx_N14C_form__ctyp_t_data_t** dst);

struct _fx_N14C_form__cexp_t_data_t;

static void _fx_free_N14C_form__cexp_t(struct _fx_N14C_form__cexp_t_data_t** dst);

struct _fx_N15C_form__cstmt_t_data_t;

static void _fx_free_N15C_form__cstmt_t(struct _fx_N15C_form__cstmt_t_data_t** dst);

struct _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t;

static void _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t** dst);

typedef struct _fx_Ta2i {
   int_ t0;
   int_ t1;
} _fx_Ta2i;

typedef struct _fx_T2Ta2iS {
   struct _fx_Ta2i t0;
   fx_str_t t1;
} _fx_T2Ta2iS;

typedef struct _fx_R9Ast__id_t {
   int_ m;
   int_ i;
   int_ j;
} _fx_R9Ast__id_t;

typedef struct _fx_R10Ast__loc_t {
   int_ m_idx;
   int_ line0;
   int_ col0;
   int_ line1;
   int_ col1;
} _fx_R10Ast__loc_t;

typedef struct _fx_T2R9Ast__id_ti {
   struct _fx_R9Ast__id_t t0;
   int_ t1;
} _fx_T2R9Ast__id_ti;

typedef struct _fx_T2Bi {
   bool t0;
   int_ t1;
} _fx_T2Bi;

typedef struct _fx_N12Ast__scope_t {
   int tag;
   union {
      int_ ScBlock;
      struct _fx_T2Bi ScLoop;
      int_ ScFold;
      int_ ScArrMap;
      int_ ScMap;
      int_ ScTry;
      struct _fx_R9Ast__id_t ScFun;
      struct _fx_R9Ast__id_t ScClass;
      struct _fx_R9Ast__id_t ScInterface;
      int_ ScModule;
   } u;
} _fx_N12Ast__scope_t;

typedef struct _fx_LN12Ast__scope_t_data_t {
   int_ rc;
   struct _fx_LN12Ast__scope_t_data_t* tl;
   struct _fx_N12Ast__scope_t hd;
} _fx_LN12Ast__scope_t_data_t, *_fx_LN12Ast__scope_t;

typedef struct _fx_R16Ast__val_flags_t {
   bool val_flag_arg;
   bool val_flag_mutable;
   bool val_flag_temp;
   bool val_flag_tempref;
   bool val_flag_private;
   bool val_flag_subarray;
   bool val_flag_instance;
   struct _fx_T2R9Ast__id_ti val_flag_method;
   int_ val_flag_ctor;
   struct _fx_LN12Ast__scope_t_data_t* val_flag_global;
} _fx_R16Ast__val_flags_t;

typedef struct _fx_R17C_form__cdefval_t {
   struct _fx_R9Ast__id_t cv_name;
   struct _fx_N14C_form__ctyp_t_data_t* cv_typ;
   fx_str_t cv_cname;
   struct _fx_R16Ast__val_flags_t cv_flags;
   struct _fx_R10Ast__loc_t cv_loc;
} _fx_R17C_form__cdefval_t;

typedef struct _fx_R19C_form__cdeflabel_t {
   struct _fx_R9Ast__id_t cl_name;
   fx_str_t cl_cname;
   struct _fx_R10Ast__loc_t cl_loc;
} _fx_R19C_form__cdeflabel_t;

typedef struct _fx_T2R9Ast__id_tN14C_form__ctyp_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N14C_form__ctyp_t_data_t* t1;
} _fx_T2R9Ast__id_tN14C_form__ctyp_t;

typedef struct _fx_LT2R9Ast__id_tN14C_form__ctyp_t_data_t {
   int_ rc;
   struct _fx_LT2R9Ast__id_tN14C_form__ctyp_t_data_t* tl;
   struct _fx_T2R9Ast__id_tN14C_form__ctyp_t hd;
} _fx_LT2R9Ast__id_tN14C_form__ctyp_t_data_t, *_fx_LT2R9Ast__id_tN14C_form__ctyp_t;

typedef struct _fx_R23C_form__cdefinterface_t {
   struct _fx_R9Ast__id_t ci_name;
   fx_str_t ci_cname;
   struct _fx_R9Ast__id_t ci_id;
   struct _fx_R9Ast__id_t ci_vtbl;
   struct _fx_R9Ast__id_t ci_base;
   struct _fx_LT2R9Ast__id_tN14C_form__ctyp_t_data_t* ci_all_methods;
   struct _fx_LN12Ast__scope_t_data_t* ci_scope;
   struct _fx_R10Ast__loc_t ci_loc;
} _fx_R23C_form__cdefinterface_t;

typedef struct _fx_rR23C_form__cdefinterface_t_data_t {
   int_ rc;
   struct _fx_R23C_form__cdefinterface_t data;
} _fx_rR23C_form__cdefinterface_t_data_t, *_fx_rR23C_form__cdefinterface_t;

typedef struct _fx_N17Ast__fun_constr_t {
   int tag;
   union {
      int_ CtorVariant;
      struct _fx_R9Ast__id_t CtorFP;
      struct _fx_R9Ast__id_t CtorExn;
   } u;
} _fx_N17Ast__fun_constr_t;

typedef struct _fx_R16Ast__fun_flags_t {
   int_ fun_flag_pure;
   bool fun_flag_ccode;
   bool fun_flag_have_keywords;
   bool fun_flag_inline;
   bool fun_flag_nothrow;
   bool fun_flag_really_nothrow;
   bool fun_flag_private;
   struct _fx_N17Ast__fun_constr_t fun_flag_ctor;
   struct _fx_R9Ast__id_t fun_flag_method_of;
   bool fun_flag_uses_fv;
   bool fun_flag_recursive;
   bool fun_flag_instance;
} _fx_R16Ast__fun_flags_t;

typedef struct _fx_LN15C_form__cstmt_t_data_t {
   int_ rc;
   struct _fx_LN15C_form__cstmt_t_data_t* tl;
   struct _fx_N15C_form__cstmt_t_data_t* hd;
} _fx_LN15C_form__cstmt_t_data_t, *_fx_LN15C_form__cstmt_t;

typedef struct _fx_N19C_form__carg_attr_t {
   int tag;
} _fx_N19C_form__carg_attr_t;

typedef struct _fx_LN19C_form__carg_attr_t_data_t {
   int_ rc;
   struct _fx_LN19C_form__carg_attr_t_data_t* tl;
   struct _fx_N19C_form__carg_attr_t hd;
} _fx_LN19C_form__carg_attr_t_data_t, *_fx_LN19C_form__carg_attr_t;

typedef struct _fx_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N14C_form__ctyp_t_data_t* t1;
   struct _fx_LN19C_form__carg_attr_t_data_t* t2;
} _fx_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t;

typedef struct _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t_data_t {
   int_ rc;
   struct _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t_data_t* tl;
   struct _fx_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t hd;
} _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t_data_t, *_fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t;

typedef struct _fx_R17C_form__cdeffun_t {
   struct _fx_R9Ast__id_t cf_name;
   fx_str_t cf_cname;
   struct _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t_data_t* cf_args;
   struct _fx_N14C_form__ctyp_t_data_t* cf_rt;
   struct _fx_LN15C_form__cstmt_t_data_t* cf_body;
   struct _fx_R16Ast__fun_flags_t cf_flags;
   struct _fx_LN12Ast__scope_t_data_t* cf_scope;
   struct _fx_R10Ast__loc_t cf_loc;
} _fx_R17C_form__cdeffun_t;

typedef struct _fx_rR17C_form__cdeffun_t_data_t {
   int_ rc;
   struct _fx_R17C_form__cdeffun_t data;
} _fx_rR17C_form__cdeffun_t_data_t, *_fx_rR17C_form__cdeffun_t;

typedef struct _fx_Ta2R9Ast__id_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_R9Ast__id_t t1;
} _fx_Ta2R9Ast__id_t;

typedef struct _fx_LR9Ast__id_t_data_t {
   int_ rc;
   struct _fx_LR9Ast__id_t_data_t* tl;
   struct _fx_R9Ast__id_t hd;
} _fx_LR9Ast__id_t_data_t, *_fx_LR9Ast__id_t;

typedef struct _fx_R17C_form__ctprops_t {
   bool ctp_scalar;
   bool ctp_complex;
   bool ctp_ptr;
   bool ctp_pass_by_ref;
   struct _fx_LR9Ast__id_t_data_t* ctp_make;
   struct _fx_Ta2R9Ast__id_t ctp_free;
   struct _fx_Ta2R9Ast__id_t ctp_copy;
} _fx_R17C_form__ctprops_t;

typedef struct _fx_R17C_form__cdeftyp_t {
   struct _fx_R9Ast__id_t ct_name;
   struct _fx_N14C_form__ctyp_t_data_t* ct_typ;
   fx_str_t ct_cname;
   struct _fx_R17C_form__ctprops_t ct_props;
   int_ ct_data_start;
   struct _fx_R9Ast__id_t ct_enum;
   struct _fx_LR9Ast__id_t_data_t* ct_ifaces;
   struct _fx_R9Ast__id_t ct_ifaces_id;
   struct _fx_LN12Ast__scope_t_data_t* ct_scope;
   struct _fx_R10Ast__loc_t ct_loc;
} _fx_R17C_form__cdeftyp_t;

typedef struct _fx_rR17C_form__cdeftyp_t_data_t {
   int_ rc;
   struct _fx_R17C_form__cdeftyp_t data;
} _fx_rR17C_form__cdeftyp_t_data_t, *_fx_rR17C_form__cdeftyp_t;

typedef struct _fx_Nt6option1N14C_form__cexp_t {
   int tag;
   union {
      struct _fx_N14C_form__cexp_t_data_t* Some;
   } u;
} _fx_Nt6option1N14C_form__cexp_t;

typedef struct _fx_T2R9Ast__id_tNt6option1N14C_form__cexp_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_Nt6option1N14C_form__cexp_t t1;
} _fx_T2R9Ast__id_tNt6option1N14C_form__cexp_t;

typedef struct _fx_LT2R9Ast__id_tNt6option1N14C_form__cexp_t_data_t {
   int_ rc;
   struct _fx_LT2R9Ast__id_tNt6option1N14C_form__cexp_t_data_t* tl;
   struct _fx_T2R9Ast__id_tNt6option1N14C_form__cexp_t hd;
} _fx_LT2R9Ast__id_tNt6option1N14C_form__cexp_t_data_t, *_fx_LT2R9Ast__id_tNt6option1N14C_form__cexp_t;

typedef struct _fx_R18C_form__cdefenum_t {
   struct _fx_R9Ast__id_t cenum_name;
   struct _fx_LT2R9Ast__id_tNt6option1N14C_form__cexp_t_data_t* cenum_members;
   fx_str_t cenum_cname;
   struct _fx_LN12Ast__scope_t_data_t* cenum_scope;
   struct _fx_R10Ast__loc_t cenum_loc;
} _fx_R18C_form__cdefenum_t;

typedef struct _fx_rR18C_form__cdefenum_t_data_t {
   int_ rc;
   struct _fx_R18C_form__cdefenum_t data;
} _fx_rR18C_form__cdefenum_t_data_t, *_fx_rR18C_form__cdefenum_t;

typedef struct _fx_R19C_form__cdefmacro_t {
   struct _fx_R9Ast__id_t cm_name;
   fx_str_t cm_cname;
   struct _fx_LR9Ast__id_t_data_t* cm_args;
   struct _fx_LN15C_form__cstmt_t_data_t* cm_body;
   struct _fx_LN12Ast__scope_t_data_t* cm_scope;
   struct _fx_R10Ast__loc_t cm_loc;
} _fx_R19C_form__cdefmacro_t;

typedef struct _fx_rR19C_form__cdefmacro_t_data_t {
   int_ rc;
   struct _fx_R19C_form__cdefmacro_t data;
} _fx_rR19C_form__cdefmacro_t_data_t, *_fx_rR19C_form__cdefmacro_t;

typedef struct _fx_R17C_form__cdefexn_t {
   struct _fx_R9Ast__id_t cexn_name;
   fx_str_t cexn_cname;
   fx_str_t cexn_base_cname;
   struct _fx_N14C_form__ctyp_t_data_t* cexn_typ;
   bool cexn_std;
   struct _fx_R9Ast__id_t cexn_tag;
   struct _fx_R9Ast__id_t cexn_data;
   struct _fx_R9Ast__id_t cexn_info;
   struct _fx_R9Ast__id_t cexn_make;
   struct _fx_LN12Ast__scope_t_data_t* cexn_scope;
   struct _fx_R10Ast__loc_t cexn_loc;
} _fx_R17C_form__cdefexn_t;

typedef struct _fx_rR17C_form__cdefexn_t_data_t {
   int_ rc;
   struct _fx_R17C_form__cdefexn_t data;
} _fx_rR17C_form__cdefexn_t_data_t, *_fx_rR17C_form__cdefexn_t;

typedef struct _fx_N15C_form__cinfo_t {
   int tag;
   union {
      struct _fx_R17C_form__cdefval_t CVal;
      struct _fx_rR17C_form__cdeffun_t_data_t* CFun;
      struct _fx_rR17C_form__cdeftyp_t_data_t* CTyp;
      struct _fx_rR17C_form__cdefexn_t_data_t* CExn;
      struct _fx_rR23C_form__cdefinterface_t_data_t* CInterface;
      struct _fx_rR18C_form__cdefenum_t_data_t* CEnum;
      struct _fx_R19C_form__cdeflabel_t CLabel;
      struct _fx_rR19C_form__cdefmacro_t_data_t* CMacro;
   } u;
} _fx_N15C_form__cinfo_t;

typedef struct _fx_R17K_form__kdefval_t {
   struct _fx_R9Ast__id_t kv_name;
   fx_str_t kv_cname;
   struct _fx_N14K_form__ktyp_t_data_t* kv_typ;
   struct _fx_R16Ast__val_flags_t kv_flags;
   struct _fx_R10Ast__loc_t kv_loc;
} _fx_R17K_form__kdefval_t;

typedef struct _fx_T2R9Ast__id_tN14K_form__ktyp_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N14K_form__ktyp_t_data_t* t1;
} _fx_T2R9Ast__id_tN14K_form__ktyp_t;

typedef struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t {
   int_ rc;
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* tl;
   struct _fx_T2R9Ast__id_tN14K_form__ktyp_t hd;
} _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t, *_fx_LT2R9Ast__id_tN14K_form__ktyp_t;

typedef struct _fx_R23K_form__kdefinterface_t {
   struct _fx_R9Ast__id_t ki_name;
   struct _fx_R9Ast__id_t ki_base;
   fx_str_t ki_cname;
   struct _fx_R9Ast__id_t ki_id;
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* ki_all_methods;
   struct _fx_LN12Ast__scope_t_data_t* ki_scope;
   struct _fx_R10Ast__loc_t ki_loc;
} _fx_R23K_form__kdefinterface_t;

typedef struct _fx_rR23K_form__kdefinterface_t_data_t {
   int_ rc;
   struct _fx_R23K_form__kdefinterface_t data;
} _fx_rR23K_form__kdefinterface_t_data_t, *_fx_rR23K_form__kdefinterface_t;

typedef struct _fx_R25K_form__kdefclosureinfo_t {
   struct _fx_R9Ast__id_t kci_arg;
   struct _fx_R9Ast__id_t kci_fcv_t;
   struct _fx_R9Ast__id_t kci_fp_typ;
   struct _fx_R9Ast__id_t kci_make_fp;
   struct _fx_R9Ast__id_t kci_wrap_f;
} _fx_R25K_form__kdefclosureinfo_t;

typedef struct _fx_R17K_form__kdeffun_t {
   struct _fx_R9Ast__id_t kf_name;
   fx_str_t kf_cname;
   struct _fx_LR9Ast__id_t_data_t* kf_params;
   struct _fx_N14K_form__ktyp_t_data_t* kf_rt;
   struct _fx_N14K_form__kexp_t_data_t* kf_body;
   struct _fx_R16Ast__fun_flags_t kf_flags;
   struct _fx_R25K_form__kdefclosureinfo_t kf_closure;
   struct _fx_LN12Ast__scope_t_data_t* kf_scope;
   struct _fx_R10Ast__loc_t kf_loc;
} _fx_R17K_form__kdeffun_t;

typedef struct _fx_rR17K_form__kdeffun_t_data_t {
   int_ rc;
   struct _fx_R17K_form__kdeffun_t data;
} _fx_rR17K_form__kdeffun_t_data_t, *_fx_rR17K_form__kdeffun_t;

typedef struct _fx_R17K_form__kdefexn_t {
   struct _fx_R9Ast__id_t ke_name;
   fx_str_t ke_cname;
   fx_str_t ke_base_cname;
   struct _fx_N14K_form__ktyp_t_data_t* ke_typ;
   bool ke_std;
   struct _fx_R9Ast__id_t ke_tag;
   struct _fx_R9Ast__id_t ke_make;
   struct _fx_LN12Ast__scope_t_data_t* ke_scope;
   struct _fx_R10Ast__loc_t ke_loc;
} _fx_R17K_form__kdefexn_t;

typedef struct _fx_rR17K_form__kdefexn_t_data_t {
   int_ rc;
   struct _fx_R17K_form__kdefexn_t data;
} _fx_rR17K_form__kdefexn_t_data_t, *_fx_rR17K_form__kdefexn_t;

typedef struct _fx_R17K_form__ktprops_t {
   bool ktp_complex;
   bool ktp_scalar;
   bool ktp_ptr;
   bool ktp_pass_by_ref;
   bool ktp_custom_free;
   bool ktp_custom_copy;
} _fx_R17K_form__ktprops_t;

typedef struct _fx_Nt6option1R17K_form__ktprops_t {
   int tag;
   union {
      struct _fx_R17K_form__ktprops_t Some;
   } u;
} _fx_Nt6option1R17K_form__ktprops_t;

typedef struct _fx_R16Ast__var_flags_t {
   int_ var_flag_class_from;
   bool var_flag_record;
   bool var_flag_recursive;
   bool var_flag_have_tag;
   bool var_flag_have_mutable;
   bool var_flag_opt;
   bool var_flag_instance;
} _fx_R16Ast__var_flags_t;

typedef struct _fx_LN14K_form__ktyp_t_data_t {
   int_ rc;
   struct _fx_LN14K_form__ktyp_t_data_t* tl;
   struct _fx_N14K_form__ktyp_t_data_t* hd;
} _fx_LN14K_form__ktyp_t_data_t, *_fx_LN14K_form__ktyp_t;

typedef struct _fx_T2R9Ast__id_tLR9Ast__id_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_LR9Ast__id_t_data_t* t1;
} _fx_T2R9Ast__id_tLR9Ast__id_t;

typedef struct _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t {
   int_ rc;
   struct _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t* tl;
   struct _fx_T2R9Ast__id_tLR9Ast__id_t hd;
} _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t, *_fx_LT2R9Ast__id_tLR9Ast__id_t;

typedef struct _fx_R21K_form__kdefvariant_t {
   struct _fx_R9Ast__id_t kvar_name;
   fx_str_t kvar_cname;
   struct _fx_R9Ast__id_t kvar_proto;
   struct _fx_Nt6option1R17K_form__ktprops_t kvar_props;
   struct _fx_LN14K_form__ktyp_t_data_t* kvar_targs;
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* kvar_cases;
   struct _fx_LR9Ast__id_t_data_t* kvar_ctors;
   struct _fx_R16Ast__var_flags_t kvar_flags;
   struct _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t* kvar_ifaces;
   struct _fx_LN12Ast__scope_t_data_t* kvar_scope;
   struct _fx_R10Ast__loc_t kvar_loc;
} _fx_R21K_form__kdefvariant_t;

typedef struct _fx_rR21K_form__kdefvariant_t_data_t {
   int_ rc;
   struct _fx_R21K_form__kdefvariant_t data;
} _fx_rR21K_form__kdefvariant_t_data_t, *_fx_rR21K_form__kdefvariant_t;

typedef struct _fx_R17K_form__kdeftyp_t {
   struct _fx_R9Ast__id_t kt_name;
   fx_str_t kt_cname;
   struct _fx_R9Ast__id_t kt_proto;
   struct _fx_Nt6option1R17K_form__ktprops_t kt_props;
   struct _fx_LN14K_form__ktyp_t_data_t* kt_targs;
   struct _fx_N14K_form__ktyp_t_data_t* kt_typ;
   struct _fx_LN12Ast__scope_t_data_t* kt_scope;
   struct _fx_R10Ast__loc_t kt_loc;
} _fx_R17K_form__kdeftyp_t;

typedef struct _fx_rR17K_form__kdeftyp_t_data_t {
   int_ rc;
   struct _fx_R17K_form__kdeftyp_t data;
} _fx_rR17K_form__kdeftyp_t_data_t, *_fx_rR17K_form__kdeftyp_t;

typedef struct _fx_R25K_form__kdefclosurevars_t {
   struct _fx_R9Ast__id_t kcv_name;
   fx_str_t kcv_cname;
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* kcv_freevars;
   struct _fx_LR9Ast__id_t_data_t* kcv_orig_freevars;
   struct _fx_LN12Ast__scope_t_data_t* kcv_scope;
   struct _fx_R10Ast__loc_t kcv_loc;
} _fx_R25K_form__kdefclosurevars_t;

typedef struct _fx_rR25K_form__kdefclosurevars_t_data_t {
   int_ rc;
   struct _fx_R25K_form__kdefclosurevars_t data;
} _fx_rR25K_form__kdefclosurevars_t_data_t, *_fx_rR25K_form__kdefclosurevars_t;

typedef struct _fx_N15K_form__kinfo_t {
   int tag;
   union {
      struct _fx_R17K_form__kdefval_t KVal;
      struct _fx_rR17K_form__kdeffun_t_data_t* KFun;
      struct _fx_rR17K_form__kdefexn_t_data_t* KExn;
      struct _fx_rR21K_form__kdefvariant_t_data_t* KVariant;
      struct _fx_rR25K_form__kdefclosurevars_t_data_t* KClosureVars;
      struct _fx_rR23K_form__kdefinterface_t_data_t* KInterface;
      struct _fx_rR17K_form__kdeftyp_t_data_t* KTyp;
   } u;
} _fx_N15K_form__kinfo_t;

typedef struct _fx_Rt24Hashset__hashset_entry_t1S {
   uint64_t hv;
   fx_str_t key;
} _fx_Rt24Hashset__hashset_entry_t1S;

typedef struct _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t {
   uint64_t hv;
   struct _fx_R9Ast__id_t key;
} _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t;

typedef struct _fx_T6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S {
   struct _fx_Rt24Hashset__hashset_entry_t1S t0;
   int_ t1;
   int_ t2;
   int_ t3;
   fx_arr_t t4;
   fx_arr_t t5;
} _fx_T6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S;

typedef struct _fx_Nt10Hashset__t1S_data_t {
   int_ rc;
   union {
      struct _fx_T6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S t;
   } u;
} _fx_Nt10Hashset__t1S_data_t, *_fx_Nt10Hashset__t1S;

typedef struct _fx_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t {
   struct _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t t0;
   int_ t1;
   int_ t2;
   int_ t3;
   fx_arr_t t4;
   fx_arr_t t5;
} _fx_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t;

typedef struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t {
   int_ rc;
   union {
      struct _fx_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t t;
   } u;
} _fx_Nt10Hashset__t1R9Ast__id_t_data_t, *_fx_Nt10Hashset__t1R9Ast__id_t;

typedef struct _fx_FPi2R9Ast__id_tR9Ast__id_t {
   int (*fp)(struct _fx_R9Ast__id_t*, struct _fx_R9Ast__id_t*, int_*, void*);
   fx_fcv_t* fcv;
} _fx_FPi2R9Ast__id_tR9Ast__id_t;

typedef struct _fx_N12Set__color_t {
   int tag;
} _fx_N12Set__color_t;

typedef struct _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t {
   struct _fx_N12Set__color_t t0;
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* t1;
   struct _fx_R9Ast__id_t t2;
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* t3;
} _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t;

typedef struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t {
   int_ rc;
   union {
      struct _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t Node;
   } u;
} _fx_Nt11Set__tree_t1R9Ast__id_t_data_t, *_fx_Nt11Set__tree_t1R9Ast__id_t;

typedef struct _fx_Rt6Set__t1R9Ast__id_t {
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* root;
   int_ size;
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t cmp;
} _fx_Rt6Set__t1R9Ast__id_t;

typedef struct _fx_T2R10Ast__loc_tS {
   struct _fx_R10Ast__loc_t t0;
   fx_str_t t1;
} _fx_T2R10Ast__loc_tS;

typedef struct _fx_N12Ast__cmpop_t {
   int tag;
} _fx_N12Ast__cmpop_t;

typedef struct _fx_N13Ast__binary_t_data_t {
   int_ rc;
   int tag;
   union {
      struct _fx_N12Ast__cmpop_t OpCmp;
      struct _fx_N12Ast__cmpop_t OpDotCmp;
      struct _fx_N13Ast__binary_t_data_t* OpAugBinary;
   } u;
} _fx_N13Ast__binary_t_data_t, *_fx_N13Ast__binary_t;

typedef struct _fx_T2SR10Ast__loc_t {
   fx_str_t t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2SR10Ast__loc_t;

typedef struct _fx_LT2SR10Ast__loc_t_data_t {
   int_ rc;
   struct _fx_LT2SR10Ast__loc_t_data_t* tl;
   struct _fx_T2SR10Ast__loc_t hd;
} _fx_LT2SR10Ast__loc_t_data_t, *_fx_LT2SR10Ast__loc_t;

typedef struct _fx_Li_data_t {
   int_ rc;
   struct _fx_Li_data_t* tl;
   int_ hd;
} _fx_Li_data_t, *_fx_Li;

typedef struct _fx_ri_data_t {
   int_ rc;
   int_ data;
} _fx_ri_data_t, *_fx_ri;

typedef struct _fx_rRt6Set__t1R9Ast__id_t_data_t {
   int_ rc;
   struct _fx_Rt6Set__t1R9Ast__id_t data;
} _fx_rRt6Set__t1R9Ast__id_t_data_t, *_fx_rRt6Set__t1R9Ast__id_t;

typedef struct _fx_T2il {
   int_ t0;
   int64_t t1;
} _fx_T2il;

typedef struct _fx_T2iq {
   int_ t0;
   uint64_t t1;
} _fx_T2iq;

typedef struct _fx_T2id {
   int_ t0;
   double t1;
} _fx_T2id;

typedef struct _fx_N14K_form__klit_t {
   int tag;
   union {
      int64_t KLitInt;
      struct _fx_T2il KLitSInt;
      struct _fx_T2iq KLitUInt;
      struct _fx_T2id KLitFloat;
      fx_str_t KLitString;
      char_ KLitChar;
      bool KLitBool;
      struct _fx_N14K_form__ktyp_t_data_t* KLitNil;
   } u;
} _fx_N14K_form__klit_t;

typedef struct _fx_N14K_form__atom_t {
   int tag;
   union {
      struct _fx_R9Ast__id_t AtomId;
      struct _fx_N14K_form__klit_t AtomLit;
   } u;
} _fx_N14K_form__atom_t;

typedef struct _fx_R22K_form__k_fold_callb_t {
   struct _fx_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t* kcb_fold_ktyp;
   struct _fx_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t_data_t* kcb_fold_kexp;
   struct _fx_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t* kcb_fold_atom;
} _fx_R22K_form__k_fold_callb_t;

typedef struct _fx_FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t {
   int (*fp)(struct _fx_N14K_form__atom_t*, struct _fx_R10Ast__loc_t*, struct _fx_R22K_form__k_fold_callb_t*, void*);
   fx_fcv_t* fcv;
} _fx_FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t;

typedef struct _fx_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t {
   int_ rc;
   union {
      struct _fx_FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t Some;
   } u;
} _fx_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t, *_fx_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t;

typedef struct _fx_FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t {
   int (*fp)(struct _fx_N14K_form__kexp_t_data_t*, struct _fx_R22K_form__k_fold_callb_t*, void*);
   fx_fcv_t* fcv;
} _fx_FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t;

typedef struct _fx_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t_data_t {
   int_ rc;
   union {
      struct _fx_FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t Some;
   } u;
} _fx_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t_data_t, *_fx_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t;

typedef struct _fx_FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t {
   int (*fp)(struct _fx_N14K_form__ktyp_t_data_t*, struct _fx_R10Ast__loc_t*, struct _fx_R22K_form__k_fold_callb_t*, void*);
   fx_fcv_t* fcv;
} _fx_FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t;

typedef struct _fx_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t {
   int_ rc;
   union {
      struct _fx_FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t Some;
   } u;
} _fx_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t, *_fx_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t;

typedef struct _fx_Nt6option1N14K_form__atom_t {
   int tag;
   union {
      struct _fx_N14K_form__atom_t Some;
   } u;
} _fx_Nt6option1N14K_form__atom_t;

typedef struct _fx_LN14K_form__kexp_t_data_t {
   int_ rc;
   struct _fx_LN14K_form__kexp_t_data_t* tl;
   struct _fx_N14K_form__kexp_t_data_t* hd;
} _fx_LN14K_form__kexp_t_data_t, *_fx_LN14K_form__kexp_t;

typedef struct _fx_T2BN14K_form__atom_t {
   bool t0;
   struct _fx_N14K_form__atom_t t1;
} _fx_T2BN14K_form__atom_t;

typedef struct _fx_LT2BN14K_form__atom_t_data_t {
   int_ rc;
   struct _fx_LT2BN14K_form__atom_t_data_t* tl;
   struct _fx_T2BN14K_form__atom_t hd;
} _fx_LT2BN14K_form__atom_t_data_t, *_fx_LT2BN14K_form__atom_t;

typedef struct _fx_N12Ast__unary_t {
   int tag;
} _fx_N12Ast__unary_t;

typedef struct _fx_N12Ast__sctyp_t {
   int tag;
} _fx_N12Ast__sctyp_t;

typedef struct _fx_N13Ast__intrin_t {
   int tag;
   union {
      struct _fx_R9Ast__id_t IntrinMath;
      struct _fx_N12Ast__sctyp_t IntrinSaturate;
   } u;
} _fx_N13Ast__intrin_t;

typedef struct _fx_N15Ast__for_make_t {
   int tag;
} _fx_N15Ast__for_make_t;

typedef struct _fx_R16Ast__for_flags_t {
   bool for_flag_parallel;
   struct _fx_N15Ast__for_make_t for_flag_make;
   bool for_flag_unzip;
   bool for_flag_fold;
   bool for_flag_nested;
} _fx_R16Ast__for_flags_t;

typedef struct _fx_N13Ast__border_t {
   int tag;
} _fx_N13Ast__border_t;

typedef struct _fx_N18Ast__interpolate_t {
   int tag;
} _fx_N18Ast__interpolate_t;

typedef struct _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t {
   struct _fx_LN14K_form__ktyp_t_data_t* t0;
   struct _fx_N14K_form__ktyp_t_data_t* t1;
} _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t;

typedef struct _fx_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* t1;
} _fx_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t;

typedef struct _fx_T2iN14K_form__ktyp_t {
   int_ t0;
   struct _fx_N14K_form__ktyp_t_data_t* t1;
} _fx_T2iN14K_form__ktyp_t;

typedef struct _fx_N14K_form__ktyp_t_data_t {
   int_ rc;
   int tag;
   union {
      int_ KTypSInt;
      int_ KTypUInt;
      int_ KTypFloat;
      struct _fx_N14K_form__ktyp_t_data_t* KTypRawPointer;
      struct _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t KTypFun;
      struct _fx_LN14K_form__ktyp_t_data_t* KTypTuple;
      struct _fx_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t KTypRecord;
      struct _fx_R9Ast__id_t KTypName;
      struct _fx_T2iN14K_form__ktyp_t KTypArray;
      struct _fx_N14K_form__ktyp_t_data_t* KTypVector;
      struct _fx_N14K_form__ktyp_t_data_t* KTypList;
      struct _fx_N14K_form__ktyp_t_data_t* KTypRef;
   } u;
} _fx_N14K_form__ktyp_t_data_t, *_fx_N14K_form__ktyp_t;

typedef struct _fx_Ta3N14K_form__atom_t {
   struct _fx_N14K_form__atom_t t0;
   struct _fx_N14K_form__atom_t t1;
   struct _fx_N14K_form__atom_t t2;
} _fx_Ta3N14K_form__atom_t;

typedef struct _fx_N13K_form__dom_t {
   int tag;
   union {
      struct _fx_N14K_form__atom_t DomainElem;
      struct _fx_N14K_form__atom_t DomainFast;
      struct _fx_Ta3N14K_form__atom_t DomainRange;
   } u;
} _fx_N13K_form__dom_t;

typedef struct _fx_T2Nt6option1N14K_form__atom_tR10Ast__loc_t {
   struct _fx_Nt6option1N14K_form__atom_t t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2Nt6option1N14K_form__atom_tR10Ast__loc_t;

typedef struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N14K_form__ktyp_t_data_t* t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N14K_form__atom_t t0;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t1;
} _fx_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N13Ast__binary_t_data_t* t0;
   struct _fx_N14K_form__atom_t t1;
   struct _fx_N14K_form__atom_t t2;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t3;
} _fx_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N12Ast__unary_t t0;
   struct _fx_N14K_form__atom_t t1;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t2;
} _fx_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_LN14K_form__atom_t_data_t {
   int_ rc;
   struct _fx_LN14K_form__atom_t_data_t* tl;
   struct _fx_N14K_form__atom_t hd;
} _fx_LN14K_form__atom_t_data_t, *_fx_LN14K_form__atom_t;

typedef struct _fx_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N13Ast__intrin_t t0;
   struct _fx_LN14K_form__atom_t_data_t* t1;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t2;
} _fx_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T2R9Ast__id_tN14K_form__kexp_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N14K_form__kexp_t_data_t* t1;
} _fx_T2R9Ast__id_tN14K_form__kexp_t;

typedef struct _fx_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_LN14K_form__kexp_t_data_t* t0;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t1;
} _fx_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N14K_form__kexp_t_data_t* t0;
   struct _fx_N14K_form__kexp_t_data_t* t1;
   struct _fx_N14K_form__kexp_t_data_t* t2;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t3;
} _fx_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_LN14K_form__atom_t_data_t* t1;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t2;
} _fx_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   int_ t1;
   struct _fx_LN14K_form__atom_t_data_t* t2;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t3;
} _fx_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_LN14K_form__atom_t_data_t* t0;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t1;
} _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_R9Ast__id_t t1;
   struct _fx_LN14K_form__atom_t_data_t* t2;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t3;
} _fx_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_LLT2BN14K_form__atom_t_data_t {
   int_ rc;
   struct _fx_LLT2BN14K_form__atom_t_data_t* tl;
   struct _fx_LT2BN14K_form__atom_t_data_t* hd;
} _fx_LLT2BN14K_form__atom_t_data_t, *_fx_LLT2BN14K_form__atom_t;

typedef struct _fx_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   bool t0;
   struct _fx_LLT2BN14K_form__atom_t_data_t* t1;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t2;
} _fx_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_LT2BN14K_form__atom_t_data_t* t0;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t1;
} _fx_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_LN13K_form__dom_t_data_t {
   int_ rc;
   struct _fx_LN13K_form__dom_t_data_t* tl;
   struct _fx_N13K_form__dom_t hd;
} _fx_LN13K_form__dom_t_data_t, *_fx_LN13K_form__dom_t;

typedef struct _fx_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N14K_form__atom_t t0;
   struct _fx_N13Ast__border_t t1;
   struct _fx_N18Ast__interpolate_t t2;
   struct _fx_LN13K_form__dom_t_data_t* t3;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t4;
} _fx_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   int_ t1;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t2;
} _fx_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N14K_form__atom_t t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t;

typedef struct _fx_T2LN14K_form__kexp_tN14K_form__kexp_t {
   struct _fx_LN14K_form__kexp_t_data_t* t0;
   struct _fx_N14K_form__kexp_t_data_t* t1;
} _fx_T2LN14K_form__kexp_tN14K_form__kexp_t;

typedef struct _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t {
   int_ rc;
   struct _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t* tl;
   struct _fx_T2LN14K_form__kexp_tN14K_form__kexp_t hd;
} _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t, *_fx_LT2LN14K_form__kexp_tN14K_form__kexp_t;

typedef struct _fx_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t* t0;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t1;
} _fx_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N14K_form__kexp_t_data_t* t0;
   struct _fx_N14K_form__kexp_t_data_t* t1;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t2;
} _fx_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T3R9Ast__id_tBR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   bool t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3R9Ast__id_tBR10Ast__loc_t;

typedef struct _fx_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N14K_form__atom_t t0;
   struct _fx_N14K_form__ktyp_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T2R9Ast__id_tN13K_form__dom_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N13K_form__dom_t t1;
} _fx_T2R9Ast__id_tN13K_form__dom_t;

typedef struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t {
   int_ rc;
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* tl;
   struct _fx_T2R9Ast__id_tN13K_form__dom_t hd;
} _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t, *_fx_LT2R9Ast__id_tN13K_form__dom_t;

typedef struct _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t {
   struct _fx_N14K_form__kexp_t_data_t* t0;
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* t1;
   struct _fx_LR9Ast__id_t_data_t* t2;
} _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t;

typedef struct _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t {
   int_ rc;
   struct _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t* tl;
   struct _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t hd;
} _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t, *_fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t;

typedef struct _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t* t0;
   struct _fx_N14K_form__kexp_t_data_t* t1;
   struct _fx_R16Ast__for_flags_t t2;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t3;
} _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t {
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* t0;
   struct _fx_LR9Ast__id_t_data_t* t1;
   struct _fx_N14K_form__kexp_t_data_t* t2;
   struct _fx_R16Ast__for_flags_t t3;
   struct _fx_R10Ast__loc_t t4;
} _fx_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t;

typedef struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t {
   struct _fx_N14K_form__kexp_t_data_t* t0;
   struct _fx_N14K_form__kexp_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t;

typedef struct _fx_T2ST2N14K_form__ktyp_tR10Ast__loc_t {
   fx_str_t t0;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t1;
} _fx_T2ST2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N14K_form__kexp_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t;

typedef struct _fx_N14K_form__kexp_t_data_t {
   int_ rc;
   int tag;
   union {
      struct _fx_R10Ast__loc_t KExpNop;
      struct _fx_R10Ast__loc_t KExpBreak;
      struct _fx_R10Ast__loc_t KExpContinue;
      struct _fx_T2Nt6option1N14K_form__atom_tR10Ast__loc_t KExpReturn;
      struct _fx_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpAtom;
      struct _fx_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpBinary;
      struct _fx_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpUnary;
      struct _fx_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpIntrin;
      struct _fx_T2R9Ast__id_tN14K_form__kexp_t KExpSync;
      struct _fx_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t KExpSeq;
      struct _fx_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t KExpIf;
      struct _fx_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpCall;
      struct _fx_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpICall;
      struct _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpMkTuple;
      struct _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpMkRecord;
      struct _fx_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpMkClosure;
      struct _fx_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpMkArray;
      struct _fx_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpMkVector;
      struct _fx_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t
         KExpAt;
      struct _fx_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t KExpMem;
      struct _fx_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t KExpAssign;
      struct _fx_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t KExpMatch;
      struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t KExpTryCatch;
      struct _fx_T3R9Ast__id_tBR10Ast__loc_t KExpThrow;
      struct _fx_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t KExpCast;
      struct _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t
         KExpMap;
      struct _fx_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t KExpFor;
      struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t KExpWhile;
      struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t KExpDoWhile;
      struct _fx_T2ST2N14K_form__ktyp_tR10Ast__loc_t KExpCCode;
      struct _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t KDefVal;
      struct _fx_rR17K_form__kdeffun_t_data_t* KDefFun;
      struct _fx_rR17K_form__kdefexn_t_data_t* KDefExn;
      struct _fx_rR21K_form__kdefvariant_t_data_t* KDefVariant;
      struct _fx_rR23K_form__kdefinterface_t_data_t* KDefInterface;
      struct _fx_rR17K_form__kdeftyp_t_data_t* KDefTyp;
      struct _fx_rR25K_form__kdefclosurevars_t_data_t* KDefClosureVars;
   } u;
} _fx_N14K_form__kexp_t_data_t, *_fx_N14K_form__kexp_t;

typedef struct _fx_R14Ast__pragmas_t {
   bool pragma_cpp;
   struct _fx_LT2SR10Ast__loc_t_data_t* pragma_clibs;
} _fx_R14Ast__pragmas_t;

typedef struct _fx_R17K_form__kmodule_t {
   struct _fx_R9Ast__id_t km_name;
   int_ km_idx;
   int_ km_toposort_idx;
   fx_str_t km_cname;
   struct _fx_LN14K_form__kexp_t_data_t* km_top;
   struct _fx_Li_data_t* km_deps;
   bool km_skip;
   bool km_main;
   struct _fx_R14Ast__pragmas_t km_pragmas;
} _fx_R17K_form__kmodule_t;

typedef struct _fx_LR17K_form__kmodule_t_data_t {
   int_ rc;
   struct _fx_LR17K_form__kmodule_t_data_t* tl;
   struct _fx_R17K_form__kmodule_t hd;
} _fx_LR17K_form__kmodule_t_data_t, *_fx_LR17K_form__kmodule_t;

typedef struct _fx_rNt10Hashset__t1R9Ast__id_t_data_t {
   int_ rc;
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* data;
} _fx_rNt10Hashset__t1R9Ast__id_t_data_t, *_fx_rNt10Hashset__t1R9Ast__id_t;

typedef struct _fx_R22C_form__c_fold_callb_t {
   struct _fx_Nt6option1FPv2R9Ast__id_tR22C_form__c_fold_callb_t_data_t* ccb_fold_ident;
   struct _fx_Nt6option1FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t_data_t* ccb_fold_typ;
   struct _fx_Nt6option1FPv2N14C_form__cexp_tR22C_form__c_fold_callb_t_data_t* ccb_fold_exp;
   struct _fx_Nt6option1FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t_data_t* ccb_fold_stmt;
} _fx_R22C_form__c_fold_callb_t;

typedef struct _fx_FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t {
   int (*fp)(struct _fx_N15C_form__cstmt_t_data_t*, struct _fx_R22C_form__c_fold_callb_t*, void*);
   fx_fcv_t* fcv;
} _fx_FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t;

typedef struct _fx_Nt6option1FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t_data_t {
   int_ rc;
   union {
      struct _fx_FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t Some;
   } u;
} _fx_Nt6option1FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t_data_t, *_fx_Nt6option1FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t;

typedef struct _fx_FPv2N14C_form__cexp_tR22C_form__c_fold_callb_t {
   int (*fp)(struct _fx_N14C_form__cexp_t_data_t*, struct _fx_R22C_form__c_fold_callb_t*, void*);
   fx_fcv_t* fcv;
} _fx_FPv2N14C_form__cexp_tR22C_form__c_fold_callb_t;

typedef struct _fx_Nt6option1FPv2N14C_form__cexp_tR22C_form__c_fold_callb_t_data_t {
   int_ rc;
   union {
      struct _fx_FPv2N14C_form__cexp_tR22C_form__c_fold_callb_t Some;
   } u;
} _fx_Nt6option1FPv2N14C_form__cexp_tR22C_form__c_fold_callb_t_data_t, *_fx_Nt6option1FPv2N14C_form__cexp_tR22C_form__c_fold_callb_t;

typedef struct _fx_FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t {
   int (*fp)(struct _fx_N14C_form__ctyp_t_data_t*, struct _fx_R22C_form__c_fold_callb_t*, void*);
   fx_fcv_t* fcv;
} _fx_FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t;

typedef struct _fx_Nt6option1FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t_data_t {
   int_ rc;
   union {
      struct _fx_FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t Some;
   } u;
} _fx_Nt6option1FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t_data_t, *_fx_Nt6option1FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t;

typedef struct _fx_FPv2R9Ast__id_tR22C_form__c_fold_callb_t {
   int (*fp)(struct _fx_R9Ast__id_t*, struct _fx_R22C_form__c_fold_callb_t*, void*);
   fx_fcv_t* fcv;
} _fx_FPv2R9Ast__id_tR22C_form__c_fold_callb_t;

typedef struct _fx_Nt6option1FPv2R9Ast__id_tR22C_form__c_fold_callb_t_data_t {
   int_ rc;
   union {
      struct _fx_FPv2R9Ast__id_tR22C_form__c_fold_callb_t Some;
   } u;
} _fx_Nt6option1FPv2R9Ast__id_tR22C_form__c_fold_callb_t_data_t, *_fx_Nt6option1FPv2R9Ast__id_tR22C_form__c_fold_callb_t;

typedef struct _fx_Nt6option1N14C_form__ctyp_t {
   int tag;
   union {
      struct _fx_N14C_form__ctyp_t_data_t* Some;
   } u;
} _fx_Nt6option1N14C_form__ctyp_t;

typedef struct _fx_Nt6option1R9Ast__id_t {
   int tag;
   union {
      struct _fx_R9Ast__id_t Some;
   } u;
} _fx_Nt6option1R9Ast__id_t;

typedef struct _fx_T2R9Ast__id_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2R9Ast__id_tR10Ast__loc_t;

typedef struct _fx_N17C_form__cbinary_t {
   int tag;
   union {
      struct _fx_N12Ast__cmpop_t COpCmp;
   } u;
} _fx_N17C_form__cbinary_t;

typedef struct _fx_N16C_form__cunary_t {
   int tag;
} _fx_N16C_form__cunary_t;

typedef struct _fx_N19C_form__ctyp_attr_t {
   int tag;
} _fx_N19C_form__ctyp_attr_t;

typedef struct _fx_T2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t {
   struct _fx_Nt6option1R9Ast__id_t t0;
   struct _fx_LT2R9Ast__id_tN14C_form__ctyp_t_data_t* t1;
} _fx_T2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t;

typedef struct _fx_LN14C_form__ctyp_t_data_t {
   int_ rc;
   struct _fx_LN14C_form__ctyp_t_data_t* tl;
   struct _fx_N14C_form__ctyp_t_data_t* hd;
} _fx_LN14C_form__ctyp_t_data_t, *_fx_LN14C_form__ctyp_t;

typedef struct _fx_T2LN14C_form__ctyp_tN14C_form__ctyp_t {
   struct _fx_LN14C_form__ctyp_t_data_t* t0;
   struct _fx_N14C_form__ctyp_t_data_t* t1;
} _fx_T2LN14C_form__ctyp_tN14C_form__ctyp_t;

typedef struct _fx_LN19C_form__ctyp_attr_t_data_t {
   int_ rc;
   struct _fx_LN19C_form__ctyp_attr_t_data_t* tl;
   struct _fx_N19C_form__ctyp_attr_t hd;
} _fx_LN19C_form__ctyp_attr_t_data_t, *_fx_LN19C_form__ctyp_attr_t;

typedef struct _fx_T2LN19C_form__ctyp_attr_tN14C_form__ctyp_t {
   struct _fx_LN19C_form__ctyp_attr_t_data_t* t0;
   struct _fx_N14C_form__ctyp_t_data_t* t1;
} _fx_T2LN19C_form__ctyp_attr_tN14C_form__ctyp_t;

typedef struct _fx_T2iN14C_form__ctyp_t {
   int_ t0;
   struct _fx_N14C_form__ctyp_t_data_t* t1;
} _fx_T2iN14C_form__ctyp_t;

typedef struct _fx_N14C_form__ctyp_t_data_t {
   int_ rc;
   int tag;
   union {
      int_ CTypSInt;
      int_ CTypUInt;
      int_ CTypFloat;
      struct _fx_T2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t CTypStruct;
      struct _fx_T2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t CTypUnion;
      struct _fx_T2LN14C_form__ctyp_tN14C_form__ctyp_t CTypFunRawPtr;
      struct _fx_T2LN19C_form__ctyp_attr_tN14C_form__ctyp_t CTypRawPtr;
      struct _fx_T2LN19C_form__ctyp_attr_tN14C_form__ctyp_t CTypRawArray;
      struct _fx_T2iN14C_form__ctyp_t CTypArray;
      struct _fx_N14C_form__ctyp_t_data_t* CTypVector;
      struct _fx_R9Ast__id_t CTypName;
   } u;
} _fx_N14C_form__ctyp_t_data_t, *_fx_N14C_form__ctyp_t;

typedef struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t {
   struct _fx_N14C_form__ctyp_t_data_t* t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2N14C_form__ctyp_tR10Ast__loc_t;

typedef struct _fx_T2R9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t t1;
} _fx_T2R9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t;

typedef struct _fx_T2N14K_form__klit_tT2N14C_form__ctyp_tR10Ast__loc_t {
   struct _fx_N14K_form__klit_t t0;
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t t1;
} _fx_T2N14K_form__klit_tT2N14C_form__ctyp_tR10Ast__loc_t;

typedef struct _fx_T4N17C_form__cbinary_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t {
   struct _fx_N17C_form__cbinary_t t0;
   struct _fx_N14C_form__cexp_t_data_t* t1;
   struct _fx_N14C_form__cexp_t_data_t* t2;
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t t3;
} _fx_T4N17C_form__cbinary_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t;

typedef struct _fx_T3N16C_form__cunary_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t {
   struct _fx_N16C_form__cunary_t t0;
   struct _fx_N14C_form__cexp_t_data_t* t1;
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t t2;
} _fx_T3N16C_form__cunary_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t;

typedef struct _fx_T3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t {
   struct _fx_N14C_form__cexp_t_data_t* t0;
   struct _fx_R9Ast__id_t t1;
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t t2;
} _fx_T3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t;

typedef struct _fx_T3N14C_form__cexp_tN14C_form__ctyp_tR10Ast__loc_t {
   struct _fx_N14C_form__cexp_t_data_t* t0;
   struct _fx_N14C_form__ctyp_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3N14C_form__cexp_tN14C_form__ctyp_tR10Ast__loc_t;

typedef struct _fx_T4N14C_form__cexp_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t {
   struct _fx_N14C_form__cexp_t_data_t* t0;
   struct _fx_N14C_form__cexp_t_data_t* t1;
   struct _fx_N14C_form__cexp_t_data_t* t2;
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t t3;
} _fx_T4N14C_form__cexp_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t;

typedef struct _fx_LN14C_form__cexp_t_data_t {
   int_ rc;
   struct _fx_LN14C_form__cexp_t_data_t* tl;
   struct _fx_N14C_form__cexp_t_data_t* hd;
} _fx_LN14C_form__cexp_t_data_t, *_fx_LN14C_form__cexp_t;

typedef struct _fx_T3N14C_form__cexp_tLN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t {
   struct _fx_N14C_form__cexp_t_data_t* t0;
   struct _fx_LN14C_form__cexp_t_data_t* t1;
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t t2;
} _fx_T3N14C_form__cexp_tLN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t;

typedef struct _fx_T2LN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t {
   struct _fx_LN14C_form__cexp_t_data_t* t0;
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t t1;
} _fx_T2LN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t;

typedef struct _fx_N14C_form__cexp_t_data_t {
   int_ rc;
   int tag;
   union {
      struct _fx_T2R9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t CExpIdent;
      struct _fx_T2N14K_form__klit_tT2N14C_form__ctyp_tR10Ast__loc_t CExpLit;
      struct _fx_T4N17C_form__cbinary_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t CExpBinary;
      struct _fx_T3N16C_form__cunary_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t CExpUnary;
      struct _fx_T3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t CExpMem;
      struct _fx_T3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t CExpArrow;
      struct _fx_T3N14C_form__cexp_tN14C_form__ctyp_tR10Ast__loc_t CExpCast;
      struct _fx_T4N14C_form__cexp_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t CExpTernary;
      struct _fx_T3N14C_form__cexp_tLN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t CExpCall;
      struct _fx_T2LN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t CExpInit;
      struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t CExpTyp;
      struct _fx_T2SR10Ast__loc_t CExpCCode;
   } u;
} _fx_N14C_form__cexp_t_data_t, *_fx_N14C_form__cexp_t;

typedef struct _fx_T2Nt6option1N14C_form__cexp_tR10Ast__loc_t {
   struct _fx_Nt6option1N14C_form__cexp_t t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2Nt6option1N14C_form__cexp_tR10Ast__loc_t;

typedef struct _fx_T2LN15C_form__cstmt_tR10Ast__loc_t {
   struct _fx_LN15C_form__cstmt_t_data_t* t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2LN15C_form__cstmt_tR10Ast__loc_t;

typedef struct _fx_T2R9Ast__id_tN15C_form__cstmt_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N15C_form__cstmt_t_data_t* t1;
} _fx_T2R9Ast__id_tN15C_form__cstmt_t;

typedef struct _fx_T4N14C_form__cexp_tN15C_form__cstmt_tN15C_form__cstmt_tR10Ast__loc_t {
   struct _fx_N14C_form__cexp_t_data_t* t0;
   struct _fx_N15C_form__cstmt_t_data_t* t1;
   struct _fx_N15C_form__cstmt_t_data_t* t2;
   struct _fx_R10Ast__loc_t t3;
} _fx_T4N14C_form__cexp_tN15C_form__cstmt_tN15C_form__cstmt_tR10Ast__loc_t;

typedef struct _fx_T6Nt6option1N14C_form__ctyp_tLN14C_form__cexp_tNt6option1N14C_form__cexp_tLN14C_form__cexp_tN15C_form__cstmt_tR10Ast__loc_t {
   struct _fx_Nt6option1N14C_form__ctyp_t t0;
   struct _fx_LN14C_form__cexp_t_data_t* t1;
   struct _fx_Nt6option1N14C_form__cexp_t t2;
   struct _fx_LN14C_form__cexp_t_data_t* t3;
   struct _fx_N15C_form__cstmt_t_data_t* t4;
   struct _fx_R10Ast__loc_t t5;
} _fx_T6Nt6option1N14C_form__ctyp_tLN14C_form__cexp_tNt6option1N14C_form__cexp_tLN14C_form__cexp_tN15C_form__cstmt_tR10Ast__loc_t;

typedef struct _fx_T3N14C_form__cexp_tN15C_form__cstmt_tR10Ast__loc_t {
   struct _fx_N14C_form__cexp_t_data_t* t0;
   struct _fx_N15C_form__cstmt_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3N14C_form__cexp_tN15C_form__cstmt_tR10Ast__loc_t;

typedef struct _fx_T3N15C_form__cstmt_tN14C_form__cexp_tR10Ast__loc_t {
   struct _fx_N15C_form__cstmt_t_data_t* t0;
   struct _fx_N14C_form__cexp_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3N15C_form__cstmt_tN14C_form__cexp_tR10Ast__loc_t;

typedef struct _fx_T2LN14C_form__cexp_tLN15C_form__cstmt_t {
   struct _fx_LN14C_form__cexp_t_data_t* t0;
   struct _fx_LN15C_form__cstmt_t_data_t* t1;
} _fx_T2LN14C_form__cexp_tLN15C_form__cstmt_t;

typedef struct _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t_data_t {
   int_ rc;
   struct _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t_data_t* tl;
   struct _fx_T2LN14C_form__cexp_tLN15C_form__cstmt_t hd;
} _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t_data_t, *_fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t;

typedef struct _fx_T3N14C_form__cexp_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tR10Ast__loc_t {
   struct _fx_N14C_form__cexp_t_data_t* t0;
   struct _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3N14C_form__cexp_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tR10Ast__loc_t;

typedef struct _fx_T4N14C_form__ctyp_tR9Ast__id_tNt6option1N14C_form__cexp_tR10Ast__loc_t {
   struct _fx_N14C_form__ctyp_t_data_t* t0;
   struct _fx_R9Ast__id_t t1;
   struct _fx_Nt6option1N14C_form__cexp_t t2;
   struct _fx_R10Ast__loc_t t3;
} _fx_T4N14C_form__ctyp_tR9Ast__id_tNt6option1N14C_form__cexp_tR10Ast__loc_t;

typedef struct _fx_T2N14C_form__cexp_tLN15C_form__cstmt_t {
   struct _fx_N14C_form__cexp_t_data_t* t0;
   struct _fx_LN15C_form__cstmt_t_data_t* t1;
} _fx_T2N14C_form__cexp_tLN15C_form__cstmt_t;

typedef struct _fx_LT2N14C_form__cexp_tLN15C_form__cstmt_t_data_t {
   int_ rc;
   struct _fx_LT2N14C_form__cexp_tLN15C_form__cstmt_t_data_t* tl;
   struct _fx_T2N14C_form__cexp_tLN15C_form__cstmt_t hd;
} _fx_LT2N14C_form__cexp_tLN15C_form__cstmt_t_data_t, *_fx_LT2N14C_form__cexp_tLN15C_form__cstmt_t;

typedef struct _fx_T3LT2N14C_form__cexp_tLN15C_form__cstmt_tLN15C_form__cstmt_tR10Ast__loc_t {
   struct _fx_LT2N14C_form__cexp_tLN15C_form__cstmt_t_data_t* t0;
   struct _fx_LN15C_form__cstmt_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3LT2N14C_form__cexp_tLN15C_form__cstmt_tLN15C_form__cstmt_tR10Ast__loc_t;

typedef struct _fx_N15C_form__cstmt_t_data_t {
   int_ rc;
   int tag;
   union {
      struct _fx_R10Ast__loc_t CStmtNop;
      struct _fx_T2SR10Ast__loc_t CComment;
      struct _fx_N14C_form__cexp_t_data_t* CExp;
      struct _fx_R10Ast__loc_t CStmtBreak;
      struct _fx_R10Ast__loc_t CStmtContinue;
      struct _fx_T2Nt6option1N14C_form__cexp_tR10Ast__loc_t CStmtReturn;
      struct _fx_T2LN15C_form__cstmt_tR10Ast__loc_t CStmtBlock;
      struct _fx_T2R9Ast__id_tN15C_form__cstmt_t CStmtSync;
      struct _fx_T4N14C_form__cexp_tN15C_form__cstmt_tN15C_form__cstmt_tR10Ast__loc_t CStmtIf;
      struct _fx_T2R9Ast__id_tR10Ast__loc_t CStmtGoto;
      struct _fx_T2R9Ast__id_tR10Ast__loc_t CStmtLabel;
      struct _fx_T6Nt6option1N14C_form__ctyp_tLN14C_form__cexp_tNt6option1N14C_form__cexp_tLN14C_form__cexp_tN15C_form__cstmt_tR10Ast__loc_t
         CStmtFor;
      struct _fx_T3N14C_form__cexp_tN15C_form__cstmt_tR10Ast__loc_t CStmtWhile;
      struct _fx_T3N15C_form__cstmt_tN14C_form__cexp_tR10Ast__loc_t CStmtDoWhile;
      struct _fx_T3N14C_form__cexp_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tR10Ast__loc_t CStmtSwitch;
      struct _fx_T4N14C_form__ctyp_tR9Ast__id_tNt6option1N14C_form__cexp_tR10Ast__loc_t CDefVal;
      struct _fx_rR17C_form__cdeffun_t_data_t* CDefFun;
      struct _fx_rR17C_form__cdeftyp_t_data_t* CDefTyp;
      struct _fx_T2R9Ast__id_tR10Ast__loc_t CDefForwardSym;
      struct _fx_T2R9Ast__id_tR10Ast__loc_t CDefForwardTyp;
      struct _fx_rR18C_form__cdefenum_t_data_t* CDefEnum;
      struct _fx_rR23C_form__cdefinterface_t_data_t* CDefInterface;
      struct _fx_rR19C_form__cdefmacro_t_data_t* CMacroDef;
      struct _fx_T2R9Ast__id_tR10Ast__loc_t CMacroUndef;
      struct _fx_T3LT2N14C_form__cexp_tLN15C_form__cstmt_tLN15C_form__cstmt_tR10Ast__loc_t CMacroIf;
      struct _fx_T2SR10Ast__loc_t CMacroInclude;
      struct _fx_T2SR10Ast__loc_t CMacroPragma;
   } u;
} _fx_N15C_form__cstmt_t_data_t, *_fx_N15C_form__cstmt_t;

typedef struct _fx_R29C_gen_types__ctyp_temp_info_t {
   struct _fx_rR17C_form__cdeftyp_t_data_t* ctti_struct_decl;
   struct _fx_rR17C_form__cdeffun_t_data_t* ctti_freef_decl;
   struct _fx_rR17C_form__cdeffun_t_data_t* ctti_copyf_decl;
   struct _fx_N14C_form__cexp_t_data_t* ctti_src_exp;
   struct _fx_N14C_form__cexp_t_data_t* ctti_dst_exp;
   fx_str_t ctti_cname_wo_prefix;
} _fx_R29C_gen_types__ctyp_temp_info_t;

typedef struct _fx_Nt6option1R29C_gen_types__ctyp_temp_info_t {
   int tag;
   union {
      struct _fx_R29C_gen_types__ctyp_temp_info_t Some;
   } u;
} _fx_Nt6option1R29C_gen_types__ctyp_temp_info_t;

typedef struct _fx_N12Map__color_t {
   int tag;
} _fx_N12Map__color_t;

typedef struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t {
   struct _fx_N12Map__color_t t0;
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t* t1;
   struct _fx_R9Ast__id_t t2;
   struct _fx_R29C_gen_types__ctyp_temp_info_t t3;
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t* t4;
} _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t;

typedef struct _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t {
   int_ rc;
   union {
      struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t
         Node;
   } u;
} _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t, *_fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t;

typedef struct _fx_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t {
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t* root;
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t cmp;
} _fx_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t;

typedef struct _fx_T2Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tB {
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t* t0;
   bool t1;
} _fx_T2Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tB;

typedef struct _fx_T2Nt11Set__tree_t1R9Ast__id_ti {
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* t0;
   int_ t1;
} _fx_T2Nt11Set__tree_t1R9Ast__id_ti;

typedef struct _fx_T2Nt11Set__tree_t1R9Ast__id_tB {
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* t0;
   bool t1;
} _fx_T2Nt11Set__tree_t1R9Ast__id_tB;

typedef struct _fx_FPv1R9Ast__id_t {
   int (*fp)(struct _fx_R9Ast__id_t*, void*);
   fx_fcv_t* fcv;
} _fx_FPv1R9Ast__id_t;

typedef struct _fx_FPB1R9Ast__id_t {
   int (*fp)(struct _fx_R9Ast__id_t*, bool*, void*);
   fx_fcv_t* fcv;
} _fx_FPB1R9Ast__id_t;

typedef struct _fx_T2BNt6option1N14C_form__cexp_t {
   bool t0;
   struct _fx_Nt6option1N14C_form__cexp_t t1;
} _fx_T2BNt6option1N14C_form__cexp_t;

typedef struct _fx_T2BR9Ast__id_t {
   bool t0;
   struct _fx_R9Ast__id_t t1;
} _fx_T2BR9Ast__id_t;

typedef struct _fx_Ta3LN15C_form__cstmt_t {
   struct _fx_LN15C_form__cstmt_t_data_t* t0;
   struct _fx_LN15C_form__cstmt_t_data_t* t1;
   struct _fx_LN15C_form__cstmt_t_data_t* t2;
} _fx_Ta3LN15C_form__cstmt_t;

typedef struct _fx_rLN15C_form__cstmt_t_data_t {
   int_ rc;
   struct _fx_LN15C_form__cstmt_t_data_t* data;
} _fx_rLN15C_form__cstmt_t_data_t, *_fx_rLN15C_form__cstmt_t;

typedef struct _fx_rRt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t {
   int_ rc;
   struct _fx_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t data;
} _fx_rRt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t, *_fx_rRt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t;

typedef struct _fx_T2N14C_form__ctyp_tLN19C_form__carg_attr_t {
   struct _fx_N14C_form__ctyp_t_data_t* t0;
   struct _fx_LN19C_form__carg_attr_t_data_t* t1;
} _fx_T2N14C_form__ctyp_tLN19C_form__carg_attr_t;

typedef struct _fx_T3BBRt6Set__t1R9Ast__id_t {
   bool t0;
   bool t1;
   struct _fx_Rt6Set__t1R9Ast__id_t t2;
} _fx_T3BBRt6Set__t1R9Ast__id_t;

typedef struct _fx_T2N14C_form__ctyp_tNt6option1R9Ast__id_t {
   struct _fx_N14C_form__ctyp_t_data_t* t0;
   struct _fx_Nt6option1R9Ast__id_t t1;
} _fx_T2N14C_form__ctyp_tNt6option1R9Ast__id_t;

typedef struct _fx_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t {
   struct _fx_LN15C_form__cstmt_t_data_t* t0;
   struct _fx_LN15C_form__cstmt_t_data_t* t1;
   struct _fx_LN15C_form__cstmt_t_data_t* t2;
   struct _fx_LT2R9Ast__id_tN14C_form__ctyp_t_data_t* t3;
   struct _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t_data_t* t4;
} _fx_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t;

typedef struct _fx_T3N14C_form__ctyp_tLN19C_form__carg_attr_tN14C_form__cexp_t {
   struct _fx_N14C_form__ctyp_t_data_t* t0;
   struct _fx_LN19C_form__carg_attr_t_data_t* t1;
   struct _fx_N14C_form__cexp_t_data_t* t2;
} _fx_T3N14C_form__ctyp_tLN19C_form__carg_attr_tN14C_form__cexp_t;

typedef struct _fx_T2BN14C_form__cexp_t {
   bool t0;
   struct _fx_N14C_form__cexp_t_data_t* t1;
} _fx_T2BN14C_form__cexp_t;

typedef struct _fx_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t {
   struct _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t_data_t* t0;
   struct _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t_data_t* t1;
   struct _fx_LT2R9Ast__id_tN14C_form__ctyp_t_data_t* t2;
} _fx_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t;

typedef struct _fx_T2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t {
   struct _fx_N15C_form__cstmt_t_data_t* t0;
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* t1;
} _fx_T2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t;

typedef struct _fx_LT2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t_data_t {
   int_ rc;
   struct _fx_LT2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t_data_t* tl;
   struct _fx_T2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t hd;
} _fx_LT2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t_data_t, *_fx_LT2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t;

typedef struct {
   int_ rc;
   int_ data;
} _fx_E4Exit_data_t;

typedef struct {
   int_ rc;
   fx_str_t data;
} _fx_E4Fail_data_t;

typedef struct {
   int_ rc;
   struct _fx_T2Ta2iS data;
} _fx_E22LexerUtils__LexerError_data_t;

typedef struct {
   int_ rc;
   struct _fx_T2R10Ast__loc_tS data;
} _fx_E17Ast__CompileError_data_t;

typedef struct {
   int_ rc;
   struct _fx_T2R10Ast__loc_tS data;
} _fx_E18Parser__ParseError_data_t;

static void _fx_free_T2Ta2iS(struct _fx_T2Ta2iS* dst)
{
   fx_free_str(&dst->t1);
}

static void _fx_copy_T2Ta2iS(struct _fx_T2Ta2iS* src, struct _fx_T2Ta2iS* dst)
{
   dst->t0 = src->t0;
   fx_copy_str(&src->t1, &dst->t1);
}

static void _fx_make_T2Ta2iS(struct _fx_Ta2i* t0, fx_str_t* t1, struct _fx_T2Ta2iS* fx_result)
{
   fx_result->t0 = *t0;
   fx_copy_str(t1, &fx_result->t1);
}

static int _fx_cons_LN12Ast__scope_t(
   struct _fx_N12Ast__scope_t* hd,
   struct _fx_LN12Ast__scope_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN12Ast__scope_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN12Ast__scope_t, FX_COPY_SIMPLE_BY_PTR);
}

static void _fx_free_R16Ast__val_flags_t(struct _fx_R16Ast__val_flags_t* dst)
{
   fx_free_list_simple(&dst->val_flag_global);
}

static void _fx_copy_R16Ast__val_flags_t(struct _fx_R16Ast__val_flags_t* src, struct _fx_R16Ast__val_flags_t* dst)
{
   dst->val_flag_arg = src->val_flag_arg;
   dst->val_flag_mutable = src->val_flag_mutable;
   dst->val_flag_temp = src->val_flag_temp;
   dst->val_flag_tempref = src->val_flag_tempref;
   dst->val_flag_private = src->val_flag_private;
   dst->val_flag_subarray = src->val_flag_subarray;
   dst->val_flag_instance = src->val_flag_instance;
   dst->val_flag_method = src->val_flag_method;
   dst->val_flag_ctor = src->val_flag_ctor;
   FX_COPY_PTR(src->val_flag_global, &dst->val_flag_global);
}

static void _fx_make_R16Ast__val_flags_t(
   bool r_val_flag_arg,
   bool r_val_flag_mutable,
   bool r_val_flag_temp,
   bool r_val_flag_tempref,
   bool r_val_flag_private,
   bool r_val_flag_subarray,
   bool r_val_flag_instance,
   struct _fx_T2R9Ast__id_ti* r_val_flag_method,
   int_ r_val_flag_ctor,
   struct _fx_LN12Ast__scope_t_data_t* r_val_flag_global,
   struct _fx_R16Ast__val_flags_t* fx_result)
{
   fx_result->val_flag_arg = r_val_flag_arg;
   fx_result->val_flag_mutable = r_val_flag_mutable;
   fx_result->val_flag_temp = r_val_flag_temp;
   fx_result->val_flag_tempref = r_val_flag_tempref;
   fx_result->val_flag_private = r_val_flag_private;
   fx_result->val_flag_subarray = r_val_flag_subarray;
   fx_result->val_flag_instance = r_val_flag_instance;
   fx_result->val_flag_method = *r_val_flag_method;
   fx_result->val_flag_ctor = r_val_flag_ctor;
   FX_COPY_PTR(r_val_flag_global, &fx_result->val_flag_global);
}

static void _fx_free_R17C_form__cdefval_t(struct _fx_R17C_form__cdefval_t* dst)
{
   _fx_free_N14C_form__ctyp_t(&dst->cv_typ);
   fx_free_str(&dst->cv_cname);
   _fx_free_R16Ast__val_flags_t(&dst->cv_flags);
}

static void _fx_copy_R17C_form__cdefval_t(struct _fx_R17C_form__cdefval_t* src, struct _fx_R17C_form__cdefval_t* dst)
{
   dst->cv_name = src->cv_name;
   FX_COPY_PTR(src->cv_typ, &dst->cv_typ);
   fx_copy_str(&src->cv_cname, &dst->cv_cname);
   _fx_copy_R16Ast__val_flags_t(&src->cv_flags, &dst->cv_flags);
   dst->cv_loc = src->cv_loc;
}

static void _fx_make_R17C_form__cdefval_t(
   struct _fx_R9Ast__id_t* r_cv_name,
   struct _fx_N14C_form__ctyp_t_data_t* r_cv_typ,
   fx_str_t* r_cv_cname,
   struct _fx_R16Ast__val_flags_t* r_cv_flags,
   struct _fx_R10Ast__loc_t* r_cv_loc,
   struct _fx_R17C_form__cdefval_t* fx_result)
{
   fx_result->cv_name = *r_cv_name;
   FX_COPY_PTR(r_cv_typ, &fx_result->cv_typ);
   fx_copy_str(r_cv_cname, &fx_result->cv_cname);
   _fx_copy_R16Ast__val_flags_t(r_cv_flags, &fx_result->cv_flags);
   fx_result->cv_loc = *r_cv_loc;
}

static void _fx_free_R19C_form__cdeflabel_t(struct _fx_R19C_form__cdeflabel_t* dst)
{
   fx_free_str(&dst->cl_cname);
}

static void _fx_copy_R19C_form__cdeflabel_t(struct _fx_R19C_form__cdeflabel_t* src, struct _fx_R19C_form__cdeflabel_t* dst)
{
   dst->cl_name = src->cl_name;
   fx_copy_str(&src->cl_cname, &dst->cl_cname);
   dst->cl_loc = src->cl_loc;
}

static void _fx_make_R19C_form__cdeflabel_t(
   struct _fx_R9Ast__id_t* r_cl_name,
   fx_str_t* r_cl_cname,
   struct _fx_R10Ast__loc_t* r_cl_loc,
   struct _fx_R19C_form__cdeflabel_t* fx_result)
{
   fx_result->cl_name = *r_cl_name;
   fx_copy_str(r_cl_cname, &fx_result->cl_cname);
   fx_result->cl_loc = *r_cl_loc;
}

static void _fx_free_T2R9Ast__id_tN14C_form__ctyp_t(struct _fx_T2R9Ast__id_tN14C_form__ctyp_t* dst)
{
   _fx_free_N14C_form__ctyp_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tN14C_form__ctyp_t(
   struct _fx_T2R9Ast__id_tN14C_form__ctyp_t* src,
   struct _fx_T2R9Ast__id_tN14C_form__ctyp_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tN14C_form__ctyp_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N14C_form__ctyp_t_data_t* t1,
   struct _fx_T2R9Ast__id_tN14C_form__ctyp_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(struct _fx_LT2R9Ast__id_tN14C_form__ctyp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2R9Ast__id_tN14C_form__ctyp_t, _fx_free_T2R9Ast__id_tN14C_form__ctyp_t);
}

static int _fx_cons_LT2R9Ast__id_tN14C_form__ctyp_t(
   struct _fx_T2R9Ast__id_tN14C_form__ctyp_t* hd,
   struct _fx_LT2R9Ast__id_tN14C_form__ctyp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2R9Ast__id_tN14C_form__ctyp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2R9Ast__id_tN14C_form__ctyp_t, _fx_copy_T2R9Ast__id_tN14C_form__ctyp_t);
}

static void _fx_free_R23C_form__cdefinterface_t(struct _fx_R23C_form__cdefinterface_t* dst)
{
   fx_free_str(&dst->ci_cname);
   _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&dst->ci_all_methods);
   fx_free_list_simple(&dst->ci_scope);
}

static void _fx_copy_R23C_form__cdefinterface_t(
   struct _fx_R23C_form__cdefinterface_t* src,
   struct _fx_R23C_form__cdefinterface_t* dst)
{
   dst->ci_name = src->ci_name;
   fx_copy_str(&src->ci_cname, &dst->ci_cname);
   dst->ci_id = src->ci_id;
   dst->ci_vtbl = src->ci_vtbl;
   dst->ci_base = src->ci_base;
   FX_COPY_PTR(src->ci_all_methods, &dst->ci_all_methods);
   FX_COPY_PTR(src->ci_scope, &dst->ci_scope);
   dst->ci_loc = src->ci_loc;
}

static void _fx_make_R23C_form__cdefinterface_t(
   struct _fx_R9Ast__id_t* r_ci_name,
   fx_str_t* r_ci_cname,
   struct _fx_R9Ast__id_t* r_ci_id,
   struct _fx_R9Ast__id_t* r_ci_vtbl,
   struct _fx_R9Ast__id_t* r_ci_base,
   struct _fx_LT2R9Ast__id_tN14C_form__ctyp_t_data_t* r_ci_all_methods,
   struct _fx_LN12Ast__scope_t_data_t* r_ci_scope,
   struct _fx_R10Ast__loc_t* r_ci_loc,
   struct _fx_R23C_form__cdefinterface_t* fx_result)
{
   fx_result->ci_name = *r_ci_name;
   fx_copy_str(r_ci_cname, &fx_result->ci_cname);
   fx_result->ci_id = *r_ci_id;
   fx_result->ci_vtbl = *r_ci_vtbl;
   fx_result->ci_base = *r_ci_base;
   FX_COPY_PTR(r_ci_all_methods, &fx_result->ci_all_methods);
   FX_COPY_PTR(r_ci_scope, &fx_result->ci_scope);
   fx_result->ci_loc = *r_ci_loc;
}

static void _fx_free_rR23C_form__cdefinterface_t(struct _fx_rR23C_form__cdefinterface_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR23C_form__cdefinterface_t, _fx_free_R23C_form__cdefinterface_t);
}

static int _fx_make_rR23C_form__cdefinterface_t(
   struct _fx_R23C_form__cdefinterface_t* arg,
   struct _fx_rR23C_form__cdefinterface_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR23C_form__cdefinterface_t, _fx_copy_R23C_form__cdefinterface_t);
}

static void _fx_free_LN15C_form__cstmt_t(struct _fx_LN15C_form__cstmt_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LN15C_form__cstmt_t, _fx_free_N15C_form__cstmt_t);
}

static int _fx_cons_LN15C_form__cstmt_t(
   struct _fx_N15C_form__cstmt_t_data_t* hd,
   struct _fx_LN15C_form__cstmt_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN15C_form__cstmt_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN15C_form__cstmt_t, FX_COPY_PTR);
}

static int _fx_cons_LN19C_form__carg_attr_t(
   struct _fx_N19C_form__carg_attr_t* hd,
   struct _fx_LN19C_form__carg_attr_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN19C_form__carg_attr_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN19C_form__carg_attr_t, FX_COPY_SIMPLE_BY_PTR);
}

static void _fx_free_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
   struct _fx_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t* dst)
{
   _fx_free_N14C_form__ctyp_t(&dst->t1);
   fx_free_list_simple(&dst->t2);
}

static void _fx_copy_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
   struct _fx_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t* src,
   struct _fx_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
}

static void _fx_make_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N14C_form__ctyp_t_data_t* t1,
   struct _fx_LN19C_form__carg_attr_t_data_t* t2,
   struct _fx_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
}

static void _fx_free_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
   struct _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t,
      _fx_free_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t);
}

static int _fx_cons_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
   struct _fx_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t* hd,
   struct _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t,
      _fx_copy_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t);
}

static void _fx_free_R17C_form__cdeffun_t(struct _fx_R17C_form__cdeffun_t* dst)
{
   fx_free_str(&dst->cf_cname);
   _fx_free_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&dst->cf_args);
   _fx_free_N14C_form__ctyp_t(&dst->cf_rt);
   _fx_free_LN15C_form__cstmt_t(&dst->cf_body);
   fx_free_list_simple(&dst->cf_scope);
}

static void _fx_copy_R17C_form__cdeffun_t(struct _fx_R17C_form__cdeffun_t* src, struct _fx_R17C_form__cdeffun_t* dst)
{
   dst->cf_name = src->cf_name;
   fx_copy_str(&src->cf_cname, &dst->cf_cname);
   FX_COPY_PTR(src->cf_args, &dst->cf_args);
   FX_COPY_PTR(src->cf_rt, &dst->cf_rt);
   FX_COPY_PTR(src->cf_body, &dst->cf_body);
   dst->cf_flags = src->cf_flags;
   FX_COPY_PTR(src->cf_scope, &dst->cf_scope);
   dst->cf_loc = src->cf_loc;
}

static void _fx_make_R17C_form__cdeffun_t(
   struct _fx_R9Ast__id_t* r_cf_name,
   fx_str_t* r_cf_cname,
   struct _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t_data_t* r_cf_args,
   struct _fx_N14C_form__ctyp_t_data_t* r_cf_rt,
   struct _fx_LN15C_form__cstmt_t_data_t* r_cf_body,
   struct _fx_R16Ast__fun_flags_t* r_cf_flags,
   struct _fx_LN12Ast__scope_t_data_t* r_cf_scope,
   struct _fx_R10Ast__loc_t* r_cf_loc,
   struct _fx_R17C_form__cdeffun_t* fx_result)
{
   fx_result->cf_name = *r_cf_name;
   fx_copy_str(r_cf_cname, &fx_result->cf_cname);
   FX_COPY_PTR(r_cf_args, &fx_result->cf_args);
   FX_COPY_PTR(r_cf_rt, &fx_result->cf_rt);
   FX_COPY_PTR(r_cf_body, &fx_result->cf_body);
   fx_result->cf_flags = *r_cf_flags;
   FX_COPY_PTR(r_cf_scope, &fx_result->cf_scope);
   fx_result->cf_loc = *r_cf_loc;
}

static void _fx_free_rR17C_form__cdeffun_t(struct _fx_rR17C_form__cdeffun_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR17C_form__cdeffun_t, _fx_free_R17C_form__cdeffun_t);
}

static int _fx_make_rR17C_form__cdeffun_t(
   struct _fx_R17C_form__cdeffun_t* arg,
   struct _fx_rR17C_form__cdeffun_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR17C_form__cdeffun_t, _fx_copy_R17C_form__cdeffun_t);
}

static int _fx_cons_LR9Ast__id_t(
   struct _fx_R9Ast__id_t* hd,
   struct _fx_LR9Ast__id_t_data_t* tl,
   bool addref_tl,
   struct _fx_LR9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LR9Ast__id_t, FX_COPY_SIMPLE_BY_PTR);
}

static void _fx_free_R17C_form__ctprops_t(struct _fx_R17C_form__ctprops_t* dst)
{
   fx_free_list_simple(&dst->ctp_make);
}

static void _fx_copy_R17C_form__ctprops_t(struct _fx_R17C_form__ctprops_t* src, struct _fx_R17C_form__ctprops_t* dst)
{
   dst->ctp_scalar = src->ctp_scalar;
   dst->ctp_complex = src->ctp_complex;
   dst->ctp_ptr = src->ctp_ptr;
   dst->ctp_pass_by_ref = src->ctp_pass_by_ref;
   FX_COPY_PTR(src->ctp_make, &dst->ctp_make);
   dst->ctp_free = src->ctp_free;
   dst->ctp_copy = src->ctp_copy;
}

static void _fx_make_R17C_form__ctprops_t(
   bool r_ctp_scalar,
   bool r_ctp_complex,
   bool r_ctp_ptr,
   bool r_ctp_pass_by_ref,
   struct _fx_LR9Ast__id_t_data_t* r_ctp_make,
   struct _fx_Ta2R9Ast__id_t* r_ctp_free,
   struct _fx_Ta2R9Ast__id_t* r_ctp_copy,
   struct _fx_R17C_form__ctprops_t* fx_result)
{
   fx_result->ctp_scalar = r_ctp_scalar;
   fx_result->ctp_complex = r_ctp_complex;
   fx_result->ctp_ptr = r_ctp_ptr;
   fx_result->ctp_pass_by_ref = r_ctp_pass_by_ref;
   FX_COPY_PTR(r_ctp_make, &fx_result->ctp_make);
   fx_result->ctp_free = *r_ctp_free;
   fx_result->ctp_copy = *r_ctp_copy;
}

static void _fx_free_R17C_form__cdeftyp_t(struct _fx_R17C_form__cdeftyp_t* dst)
{
   _fx_free_N14C_form__ctyp_t(&dst->ct_typ);
   fx_free_str(&dst->ct_cname);
   _fx_free_R17C_form__ctprops_t(&dst->ct_props);
   fx_free_list_simple(&dst->ct_ifaces);
   fx_free_list_simple(&dst->ct_scope);
}

static void _fx_copy_R17C_form__cdeftyp_t(struct _fx_R17C_form__cdeftyp_t* src, struct _fx_R17C_form__cdeftyp_t* dst)
{
   dst->ct_name = src->ct_name;
   FX_COPY_PTR(src->ct_typ, &dst->ct_typ);
   fx_copy_str(&src->ct_cname, &dst->ct_cname);
   _fx_copy_R17C_form__ctprops_t(&src->ct_props, &dst->ct_props);
   dst->ct_data_start = src->ct_data_start;
   dst->ct_enum = src->ct_enum;
   FX_COPY_PTR(src->ct_ifaces, &dst->ct_ifaces);
   dst->ct_ifaces_id = src->ct_ifaces_id;
   FX_COPY_PTR(src->ct_scope, &dst->ct_scope);
   dst->ct_loc = src->ct_loc;
}

static void _fx_make_R17C_form__cdeftyp_t(
   struct _fx_R9Ast__id_t* r_ct_name,
   struct _fx_N14C_form__ctyp_t_data_t* r_ct_typ,
   fx_str_t* r_ct_cname,
   struct _fx_R17C_form__ctprops_t* r_ct_props,
   int_ r_ct_data_start,
   struct _fx_R9Ast__id_t* r_ct_enum,
   struct _fx_LR9Ast__id_t_data_t* r_ct_ifaces,
   struct _fx_R9Ast__id_t* r_ct_ifaces_id,
   struct _fx_LN12Ast__scope_t_data_t* r_ct_scope,
   struct _fx_R10Ast__loc_t* r_ct_loc,
   struct _fx_R17C_form__cdeftyp_t* fx_result)
{
   fx_result->ct_name = *r_ct_name;
   FX_COPY_PTR(r_ct_typ, &fx_result->ct_typ);
   fx_copy_str(r_ct_cname, &fx_result->ct_cname);
   _fx_copy_R17C_form__ctprops_t(r_ct_props, &fx_result->ct_props);
   fx_result->ct_data_start = r_ct_data_start;
   fx_result->ct_enum = *r_ct_enum;
   FX_COPY_PTR(r_ct_ifaces, &fx_result->ct_ifaces);
   fx_result->ct_ifaces_id = *r_ct_ifaces_id;
   FX_COPY_PTR(r_ct_scope, &fx_result->ct_scope);
   fx_result->ct_loc = *r_ct_loc;
}

static void _fx_free_rR17C_form__cdeftyp_t(struct _fx_rR17C_form__cdeftyp_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR17C_form__cdeftyp_t, _fx_free_R17C_form__cdeftyp_t);
}

static int _fx_make_rR17C_form__cdeftyp_t(
   struct _fx_R17C_form__cdeftyp_t* arg,
   struct _fx_rR17C_form__cdeftyp_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR17C_form__cdeftyp_t, _fx_copy_R17C_form__cdeftyp_t);
}

static void _fx_free_Nt6option1N14C_form__cexp_t(struct _fx_Nt6option1N14C_form__cexp_t* dst)
{
   switch (dst->tag) {
   case 2:
      _fx_free_N14C_form__cexp_t(&dst->u.Some); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_Nt6option1N14C_form__cexp_t(
   struct _fx_Nt6option1N14C_form__cexp_t* src,
   struct _fx_Nt6option1N14C_form__cexp_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 2:
      FX_COPY_PTR(src->u.Some, &dst->u.Some); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_T2R9Ast__id_tNt6option1N14C_form__cexp_t(struct _fx_T2R9Ast__id_tNt6option1N14C_form__cexp_t* dst)
{
   _fx_free_Nt6option1N14C_form__cexp_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tNt6option1N14C_form__cexp_t(
   struct _fx_T2R9Ast__id_tNt6option1N14C_form__cexp_t* src,
   struct _fx_T2R9Ast__id_tNt6option1N14C_form__cexp_t* dst)
{
   dst->t0 = src->t0;
   _fx_copy_Nt6option1N14C_form__cexp_t(&src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tNt6option1N14C_form__cexp_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_Nt6option1N14C_form__cexp_t* t1,
   struct _fx_T2R9Ast__id_tNt6option1N14C_form__cexp_t* fx_result)
{
   fx_result->t0 = *t0;
   _fx_copy_Nt6option1N14C_form__cexp_t(t1, &fx_result->t1);
}

static void _fx_free_LT2R9Ast__id_tNt6option1N14C_form__cexp_t(
   struct _fx_LT2R9Ast__id_tNt6option1N14C_form__cexp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2R9Ast__id_tNt6option1N14C_form__cexp_t, _fx_free_T2R9Ast__id_tNt6option1N14C_form__cexp_t);
}

static int _fx_cons_LT2R9Ast__id_tNt6option1N14C_form__cexp_t(
   struct _fx_T2R9Ast__id_tNt6option1N14C_form__cexp_t* hd,
   struct _fx_LT2R9Ast__id_tNt6option1N14C_form__cexp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2R9Ast__id_tNt6option1N14C_form__cexp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2R9Ast__id_tNt6option1N14C_form__cexp_t, _fx_copy_T2R9Ast__id_tNt6option1N14C_form__cexp_t);
}

static void _fx_free_R18C_form__cdefenum_t(struct _fx_R18C_form__cdefenum_t* dst)
{
   _fx_free_LT2R9Ast__id_tNt6option1N14C_form__cexp_t(&dst->cenum_members);
   fx_free_str(&dst->cenum_cname);
   fx_free_list_simple(&dst->cenum_scope);
}

static void _fx_copy_R18C_form__cdefenum_t(struct _fx_R18C_form__cdefenum_t* src, struct _fx_R18C_form__cdefenum_t* dst)
{
   dst->cenum_name = src->cenum_name;
   FX_COPY_PTR(src->cenum_members, &dst->cenum_members);
   fx_copy_str(&src->cenum_cname, &dst->cenum_cname);
   FX_COPY_PTR(src->cenum_scope, &dst->cenum_scope);
   dst->cenum_loc = src->cenum_loc;
}

static void _fx_make_R18C_form__cdefenum_t(
   struct _fx_R9Ast__id_t* r_cenum_name,
   struct _fx_LT2R9Ast__id_tNt6option1N14C_form__cexp_t_data_t* r_cenum_members,
   fx_str_t* r_cenum_cname,
   struct _fx_LN12Ast__scope_t_data_t* r_cenum_scope,
   struct _fx_R10Ast__loc_t* r_cenum_loc,
   struct _fx_R18C_form__cdefenum_t* fx_result)
{
   fx_result->cenum_name = *r_cenum_name;
   FX_COPY_PTR(r_cenum_members, &fx_result->cenum_members);
   fx_copy_str(r_cenum_cname, &fx_result->cenum_cname);
   FX_COPY_PTR(r_cenum_scope, &fx_result->cenum_scope);
   fx_result->cenum_loc = *r_cenum_loc;
}

static void _fx_free_rR18C_form__cdefenum_t(struct _fx_rR18C_form__cdefenum_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR18C_form__cdefenum_t, _fx_free_R18C_form__cdefenum_t);
}

static int _fx_make_rR18C_form__cdefenum_t(
   struct _fx_R18C_form__cdefenum_t* arg,
   struct _fx_rR18C_form__cdefenum_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR18C_form__cdefenum_t, _fx_copy_R18C_form__cdefenum_t);
}

static void _fx_free_R19C_form__cdefmacro_t(struct _fx_R19C_form__cdefmacro_t* dst)
{
   fx_free_str(&dst->cm_cname);
   fx_free_list_simple(&dst->cm_args);
   _fx_free_LN15C_form__cstmt_t(&dst->cm_body);
   fx_free_list_simple(&dst->cm_scope);
}

static void _fx_copy_R19C_form__cdefmacro_t(struct _fx_R19C_form__cdefmacro_t* src, struct _fx_R19C_form__cdefmacro_t* dst)
{
   dst->cm_name = src->cm_name;
   fx_copy_str(&src->cm_cname, &dst->cm_cname);
   FX_COPY_PTR(src->cm_args, &dst->cm_args);
   FX_COPY_PTR(src->cm_body, &dst->cm_body);
   FX_COPY_PTR(src->cm_scope, &dst->cm_scope);
   dst->cm_loc = src->cm_loc;
}

static void _fx_make_R19C_form__cdefmacro_t(
   struct _fx_R9Ast__id_t* r_cm_name,
   fx_str_t* r_cm_cname,
   struct _fx_LR9Ast__id_t_data_t* r_cm_args,
   struct _fx_LN15C_form__cstmt_t_data_t* r_cm_body,
   struct _fx_LN12Ast__scope_t_data_t* r_cm_scope,
   struct _fx_R10Ast__loc_t* r_cm_loc,
   struct _fx_R19C_form__cdefmacro_t* fx_result)
{
   fx_result->cm_name = *r_cm_name;
   fx_copy_str(r_cm_cname, &fx_result->cm_cname);
   FX_COPY_PTR(r_cm_args, &fx_result->cm_args);
   FX_COPY_PTR(r_cm_body, &fx_result->cm_body);
   FX_COPY_PTR(r_cm_scope, &fx_result->cm_scope);
   fx_result->cm_loc = *r_cm_loc;
}

static void _fx_free_rR19C_form__cdefmacro_t(struct _fx_rR19C_form__cdefmacro_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR19C_form__cdefmacro_t, _fx_free_R19C_form__cdefmacro_t);
}

static int _fx_make_rR19C_form__cdefmacro_t(
   struct _fx_R19C_form__cdefmacro_t* arg,
   struct _fx_rR19C_form__cdefmacro_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR19C_form__cdefmacro_t, _fx_copy_R19C_form__cdefmacro_t);
}

static void _fx_free_R17C_form__cdefexn_t(struct _fx_R17C_form__cdefexn_t* dst)
{
   fx_free_str(&dst->cexn_cname);
   fx_free_str(&dst->cexn_base_cname);
   _fx_free_N14C_form__ctyp_t(&dst->cexn_typ);
   fx_free_list_simple(&dst->cexn_scope);
}

static void _fx_copy_R17C_form__cdefexn_t(struct _fx_R17C_form__cdefexn_t* src, struct _fx_R17C_form__cdefexn_t* dst)
{
   dst->cexn_name = src->cexn_name;
   fx_copy_str(&src->cexn_cname, &dst->cexn_cname);
   fx_copy_str(&src->cexn_base_cname, &dst->cexn_base_cname);
   FX_COPY_PTR(src->cexn_typ, &dst->cexn_typ);
   dst->cexn_std = src->cexn_std;
   dst->cexn_tag = src->cexn_tag;
   dst->cexn_data = src->cexn_data;
   dst->cexn_info = src->cexn_info;
   dst->cexn_make = src->cexn_make;
   FX_COPY_PTR(src->cexn_scope, &dst->cexn_scope);
   dst->cexn_loc = src->cexn_loc;
}

static void _fx_make_R17C_form__cdefexn_t(
   struct _fx_R9Ast__id_t* r_cexn_name,
   fx_str_t* r_cexn_cname,
   fx_str_t* r_cexn_base_cname,
   struct _fx_N14C_form__ctyp_t_data_t* r_cexn_typ,
   bool r_cexn_std,
   struct _fx_R9Ast__id_t* r_cexn_tag,
   struct _fx_R9Ast__id_t* r_cexn_data,
   struct _fx_R9Ast__id_t* r_cexn_info,
   struct _fx_R9Ast__id_t* r_cexn_make,
   struct _fx_LN12Ast__scope_t_data_t* r_cexn_scope,
   struct _fx_R10Ast__loc_t* r_cexn_loc,
   struct _fx_R17C_form__cdefexn_t* fx_result)
{
   fx_result->cexn_name = *r_cexn_name;
   fx_copy_str(r_cexn_cname, &fx_result->cexn_cname);
   fx_copy_str(r_cexn_base_cname, &fx_result->cexn_base_cname);
   FX_COPY_PTR(r_cexn_typ, &fx_result->cexn_typ);
   fx_result->cexn_std = r_cexn_std;
   fx_result->cexn_tag = *r_cexn_tag;
   fx_result->cexn_data = *r_cexn_data;
   fx_result->cexn_info = *r_cexn_info;
   fx_result->cexn_make = *r_cexn_make;
   FX_COPY_PTR(r_cexn_scope, &fx_result->cexn_scope);
   fx_result->cexn_loc = *r_cexn_loc;
}

static void _fx_free_rR17C_form__cdefexn_t(struct _fx_rR17C_form__cdefexn_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR17C_form__cdefexn_t, _fx_free_R17C_form__cdefexn_t);
}

static int _fx_make_rR17C_form__cdefexn_t(
   struct _fx_R17C_form__cdefexn_t* arg,
   struct _fx_rR17C_form__cdefexn_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR17C_form__cdefexn_t, _fx_copy_R17C_form__cdefexn_t);
}

static void _fx_free_N15C_form__cinfo_t(struct _fx_N15C_form__cinfo_t* dst)
{
   switch (dst->tag) {
   case 2:
      _fx_free_R17C_form__cdefval_t(&dst->u.CVal); break;
   case 3:
      _fx_free_rR17C_form__cdeffun_t(&dst->u.CFun); break;
   case 4:
      _fx_free_rR17C_form__cdeftyp_t(&dst->u.CTyp); break;
   case 5:
      _fx_free_rR17C_form__cdefexn_t(&dst->u.CExn); break;
   case 6:
      _fx_free_rR23C_form__cdefinterface_t(&dst->u.CInterface); break;
   case 7:
      _fx_free_rR18C_form__cdefenum_t(&dst->u.CEnum); break;
   case 8:
      _fx_free_R19C_form__cdeflabel_t(&dst->u.CLabel); break;
   case 9:
      _fx_free_rR19C_form__cdefmacro_t(&dst->u.CMacro); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_N15C_form__cinfo_t(struct _fx_N15C_form__cinfo_t* src, struct _fx_N15C_form__cinfo_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 2:
      _fx_copy_R17C_form__cdefval_t(&src->u.CVal, &dst->u.CVal); break;
   case 3:
      FX_COPY_PTR(src->u.CFun, &dst->u.CFun); break;
   case 4:
      FX_COPY_PTR(src->u.CTyp, &dst->u.CTyp); break;
   case 5:
      FX_COPY_PTR(src->u.CExn, &dst->u.CExn); break;
   case 6:
      FX_COPY_PTR(src->u.CInterface, &dst->u.CInterface); break;
   case 7:
      FX_COPY_PTR(src->u.CEnum, &dst->u.CEnum); break;
   case 8:
      _fx_copy_R19C_form__cdeflabel_t(&src->u.CLabel, &dst->u.CLabel); break;
   case 9:
      FX_COPY_PTR(src->u.CMacro, &dst->u.CMacro); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_R17K_form__kdefval_t(struct _fx_R17K_form__kdefval_t* dst)
{
   fx_free_str(&dst->kv_cname);
   _fx_free_N14K_form__ktyp_t(&dst->kv_typ);
   _fx_free_R16Ast__val_flags_t(&dst->kv_flags);
}

static void _fx_copy_R17K_form__kdefval_t(struct _fx_R17K_form__kdefval_t* src, struct _fx_R17K_form__kdefval_t* dst)
{
   dst->kv_name = src->kv_name;
   fx_copy_str(&src->kv_cname, &dst->kv_cname);
   FX_COPY_PTR(src->kv_typ, &dst->kv_typ);
   _fx_copy_R16Ast__val_flags_t(&src->kv_flags, &dst->kv_flags);
   dst->kv_loc = src->kv_loc;
}

static void _fx_make_R17K_form__kdefval_t(
   struct _fx_R9Ast__id_t* r_kv_name,
   fx_str_t* r_kv_cname,
   struct _fx_N14K_form__ktyp_t_data_t* r_kv_typ,
   struct _fx_R16Ast__val_flags_t* r_kv_flags,
   struct _fx_R10Ast__loc_t* r_kv_loc,
   struct _fx_R17K_form__kdefval_t* fx_result)
{
   fx_result->kv_name = *r_kv_name;
   fx_copy_str(r_kv_cname, &fx_result->kv_cname);
   FX_COPY_PTR(r_kv_typ, &fx_result->kv_typ);
   _fx_copy_R16Ast__val_flags_t(r_kv_flags, &fx_result->kv_flags);
   fx_result->kv_loc = *r_kv_loc;
}

static void _fx_free_T2R9Ast__id_tN14K_form__ktyp_t(struct _fx_T2R9Ast__id_tN14K_form__ktyp_t* dst)
{
   _fx_free_N14K_form__ktyp_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tN14K_form__ktyp_t(
   struct _fx_T2R9Ast__id_tN14K_form__ktyp_t* src,
   struct _fx_T2R9Ast__id_tN14K_form__ktyp_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tN14K_form__ktyp_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N14K_form__ktyp_t_data_t* t1,
   struct _fx_T2R9Ast__id_tN14K_form__ktyp_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2R9Ast__id_tN14K_form__ktyp_t(struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2R9Ast__id_tN14K_form__ktyp_t, _fx_free_T2R9Ast__id_tN14K_form__ktyp_t);
}

static int _fx_cons_LT2R9Ast__id_tN14K_form__ktyp_t(
   struct _fx_T2R9Ast__id_tN14K_form__ktyp_t* hd,
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2R9Ast__id_tN14K_form__ktyp_t, _fx_copy_T2R9Ast__id_tN14K_form__ktyp_t);
}

static void _fx_free_R23K_form__kdefinterface_t(struct _fx_R23K_form__kdefinterface_t* dst)
{
   fx_free_str(&dst->ki_cname);
   _fx_free_LT2R9Ast__id_tN14K_form__ktyp_t(&dst->ki_all_methods);
   fx_free_list_simple(&dst->ki_scope);
}

static void _fx_copy_R23K_form__kdefinterface_t(
   struct _fx_R23K_form__kdefinterface_t* src,
   struct _fx_R23K_form__kdefinterface_t* dst)
{
   dst->ki_name = src->ki_name;
   dst->ki_base = src->ki_base;
   fx_copy_str(&src->ki_cname, &dst->ki_cname);
   dst->ki_id = src->ki_id;
   FX_COPY_PTR(src->ki_all_methods, &dst->ki_all_methods);
   FX_COPY_PTR(src->ki_scope, &dst->ki_scope);
   dst->ki_loc = src->ki_loc;
}

static void _fx_make_R23K_form__kdefinterface_t(
   struct _fx_R9Ast__id_t* r_ki_name,
   struct _fx_R9Ast__id_t* r_ki_base,
   fx_str_t* r_ki_cname,
   struct _fx_R9Ast__id_t* r_ki_id,
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* r_ki_all_methods,
   struct _fx_LN12Ast__scope_t_data_t* r_ki_scope,
   struct _fx_R10Ast__loc_t* r_ki_loc,
   struct _fx_R23K_form__kdefinterface_t* fx_result)
{
   fx_result->ki_name = *r_ki_name;
   fx_result->ki_base = *r_ki_base;
   fx_copy_str(r_ki_cname, &fx_result->ki_cname);
   fx_result->ki_id = *r_ki_id;
   FX_COPY_PTR(r_ki_all_methods, &fx_result->ki_all_methods);
   FX_COPY_PTR(r_ki_scope, &fx_result->ki_scope);
   fx_result->ki_loc = *r_ki_loc;
}

static void _fx_free_rR23K_form__kdefinterface_t(struct _fx_rR23K_form__kdefinterface_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR23K_form__kdefinterface_t, _fx_free_R23K_form__kdefinterface_t);
}

static int _fx_make_rR23K_form__kdefinterface_t(
   struct _fx_R23K_form__kdefinterface_t* arg,
   struct _fx_rR23K_form__kdefinterface_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR23K_form__kdefinterface_t, _fx_copy_R23K_form__kdefinterface_t);
}

static void _fx_free_R17K_form__kdeffun_t(struct _fx_R17K_form__kdeffun_t* dst)
{
   fx_free_str(&dst->kf_cname);
   fx_free_list_simple(&dst->kf_params);
   _fx_free_N14K_form__ktyp_t(&dst->kf_rt);
   _fx_free_N14K_form__kexp_t(&dst->kf_body);
   fx_free_list_simple(&dst->kf_scope);
}

static void _fx_copy_R17K_form__kdeffun_t(struct _fx_R17K_form__kdeffun_t* src, struct _fx_R17K_form__kdeffun_t* dst)
{
   dst->kf_name = src->kf_name;
   fx_copy_str(&src->kf_cname, &dst->kf_cname);
   FX_COPY_PTR(src->kf_params, &dst->kf_params);
   FX_COPY_PTR(src->kf_rt, &dst->kf_rt);
   FX_COPY_PTR(src->kf_body, &dst->kf_body);
   dst->kf_flags = src->kf_flags;
   dst->kf_closure = src->kf_closure;
   FX_COPY_PTR(src->kf_scope, &dst->kf_scope);
   dst->kf_loc = src->kf_loc;
}

static void _fx_make_R17K_form__kdeffun_t(
   struct _fx_R9Ast__id_t* r_kf_name,
   fx_str_t* r_kf_cname,
   struct _fx_LR9Ast__id_t_data_t* r_kf_params,
   struct _fx_N14K_form__ktyp_t_data_t* r_kf_rt,
   struct _fx_N14K_form__kexp_t_data_t* r_kf_body,
   struct _fx_R16Ast__fun_flags_t* r_kf_flags,
   struct _fx_R25K_form__kdefclosureinfo_t* r_kf_closure,
   struct _fx_LN12Ast__scope_t_data_t* r_kf_scope,
   struct _fx_R10Ast__loc_t* r_kf_loc,
   struct _fx_R17K_form__kdeffun_t* fx_result)
{
   fx_result->kf_name = *r_kf_name;
   fx_copy_str(r_kf_cname, &fx_result->kf_cname);
   FX_COPY_PTR(r_kf_params, &fx_result->kf_params);
   FX_COPY_PTR(r_kf_rt, &fx_result->kf_rt);
   FX_COPY_PTR(r_kf_body, &fx_result->kf_body);
   fx_result->kf_flags = *r_kf_flags;
   fx_result->kf_closure = *r_kf_closure;
   FX_COPY_PTR(r_kf_scope, &fx_result->kf_scope);
   fx_result->kf_loc = *r_kf_loc;
}

static void _fx_free_rR17K_form__kdeffun_t(struct _fx_rR17K_form__kdeffun_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR17K_form__kdeffun_t, _fx_free_R17K_form__kdeffun_t);
}

static int _fx_make_rR17K_form__kdeffun_t(
   struct _fx_R17K_form__kdeffun_t* arg,
   struct _fx_rR17K_form__kdeffun_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR17K_form__kdeffun_t, _fx_copy_R17K_form__kdeffun_t);
}

static void _fx_free_R17K_form__kdefexn_t(struct _fx_R17K_form__kdefexn_t* dst)
{
   fx_free_str(&dst->ke_cname);
   fx_free_str(&dst->ke_base_cname);
   _fx_free_N14K_form__ktyp_t(&dst->ke_typ);
   fx_free_list_simple(&dst->ke_scope);
}

static void _fx_copy_R17K_form__kdefexn_t(struct _fx_R17K_form__kdefexn_t* src, struct _fx_R17K_form__kdefexn_t* dst)
{
   dst->ke_name = src->ke_name;
   fx_copy_str(&src->ke_cname, &dst->ke_cname);
   fx_copy_str(&src->ke_base_cname, &dst->ke_base_cname);
   FX_COPY_PTR(src->ke_typ, &dst->ke_typ);
   dst->ke_std = src->ke_std;
   dst->ke_tag = src->ke_tag;
   dst->ke_make = src->ke_make;
   FX_COPY_PTR(src->ke_scope, &dst->ke_scope);
   dst->ke_loc = src->ke_loc;
}

static void _fx_make_R17K_form__kdefexn_t(
   struct _fx_R9Ast__id_t* r_ke_name,
   fx_str_t* r_ke_cname,
   fx_str_t* r_ke_base_cname,
   struct _fx_N14K_form__ktyp_t_data_t* r_ke_typ,
   bool r_ke_std,
   struct _fx_R9Ast__id_t* r_ke_tag,
   struct _fx_R9Ast__id_t* r_ke_make,
   struct _fx_LN12Ast__scope_t_data_t* r_ke_scope,
   struct _fx_R10Ast__loc_t* r_ke_loc,
   struct _fx_R17K_form__kdefexn_t* fx_result)
{
   fx_result->ke_name = *r_ke_name;
   fx_copy_str(r_ke_cname, &fx_result->ke_cname);
   fx_copy_str(r_ke_base_cname, &fx_result->ke_base_cname);
   FX_COPY_PTR(r_ke_typ, &fx_result->ke_typ);
   fx_result->ke_std = r_ke_std;
   fx_result->ke_tag = *r_ke_tag;
   fx_result->ke_make = *r_ke_make;
   FX_COPY_PTR(r_ke_scope, &fx_result->ke_scope);
   fx_result->ke_loc = *r_ke_loc;
}

static void _fx_free_rR17K_form__kdefexn_t(struct _fx_rR17K_form__kdefexn_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR17K_form__kdefexn_t, _fx_free_R17K_form__kdefexn_t);
}

static int _fx_make_rR17K_form__kdefexn_t(
   struct _fx_R17K_form__kdefexn_t* arg,
   struct _fx_rR17K_form__kdefexn_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR17K_form__kdefexn_t, _fx_copy_R17K_form__kdefexn_t);
}

static void _fx_free_LN14K_form__ktyp_t(struct _fx_LN14K_form__ktyp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LN14K_form__ktyp_t, _fx_free_N14K_form__ktyp_t);
}

static int _fx_cons_LN14K_form__ktyp_t(
   struct _fx_N14K_form__ktyp_t_data_t* hd,
   struct _fx_LN14K_form__ktyp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN14K_form__ktyp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN14K_form__ktyp_t, FX_COPY_PTR);
}

static void _fx_free_T2R9Ast__id_tLR9Ast__id_t(struct _fx_T2R9Ast__id_tLR9Ast__id_t* dst)
{
   fx_free_list_simple(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tLR9Ast__id_t(
   struct _fx_T2R9Ast__id_tLR9Ast__id_t* src,
   struct _fx_T2R9Ast__id_tLR9Ast__id_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tLR9Ast__id_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_LR9Ast__id_t_data_t* t1,
   struct _fx_T2R9Ast__id_tLR9Ast__id_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2R9Ast__id_tLR9Ast__id_t(struct _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2R9Ast__id_tLR9Ast__id_t, _fx_free_T2R9Ast__id_tLR9Ast__id_t);
}

static int _fx_cons_LT2R9Ast__id_tLR9Ast__id_t(
   struct _fx_T2R9Ast__id_tLR9Ast__id_t* hd,
   struct _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2R9Ast__id_tLR9Ast__id_t, _fx_copy_T2R9Ast__id_tLR9Ast__id_t);
}

static void _fx_free_R21K_form__kdefvariant_t(struct _fx_R21K_form__kdefvariant_t* dst)
{
   fx_free_str(&dst->kvar_cname);
   _fx_free_LN14K_form__ktyp_t(&dst->kvar_targs);
   _fx_free_LT2R9Ast__id_tN14K_form__ktyp_t(&dst->kvar_cases);
   fx_free_list_simple(&dst->kvar_ctors);
   _fx_free_LT2R9Ast__id_tLR9Ast__id_t(&dst->kvar_ifaces);
   fx_free_list_simple(&dst->kvar_scope);
}

static void _fx_copy_R21K_form__kdefvariant_t(
   struct _fx_R21K_form__kdefvariant_t* src,
   struct _fx_R21K_form__kdefvariant_t* dst)
{
   dst->kvar_name = src->kvar_name;
   fx_copy_str(&src->kvar_cname, &dst->kvar_cname);
   dst->kvar_proto = src->kvar_proto;
   dst->kvar_props = src->kvar_props;
   FX_COPY_PTR(src->kvar_targs, &dst->kvar_targs);
   FX_COPY_PTR(src->kvar_cases, &dst->kvar_cases);
   FX_COPY_PTR(src->kvar_ctors, &dst->kvar_ctors);
   dst->kvar_flags = src->kvar_flags;
   FX_COPY_PTR(src->kvar_ifaces, &dst->kvar_ifaces);
   FX_COPY_PTR(src->kvar_scope, &dst->kvar_scope);
   dst->kvar_loc = src->kvar_loc;
}

static void _fx_make_R21K_form__kdefvariant_t(
   struct _fx_R9Ast__id_t* r_kvar_name,
   fx_str_t* r_kvar_cname,
   struct _fx_R9Ast__id_t* r_kvar_proto,
   struct _fx_Nt6option1R17K_form__ktprops_t* r_kvar_props,
   struct _fx_LN14K_form__ktyp_t_data_t* r_kvar_targs,
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* r_kvar_cases,
   struct _fx_LR9Ast__id_t_data_t* r_kvar_ctors,
   struct _fx_R16Ast__var_flags_t* r_kvar_flags,
   struct _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t* r_kvar_ifaces,
   struct _fx_LN12Ast__scope_t_data_t* r_kvar_scope,
   struct _fx_R10Ast__loc_t* r_kvar_loc,
   struct _fx_R21K_form__kdefvariant_t* fx_result)
{
   fx_result->kvar_name = *r_kvar_name;
   fx_copy_str(r_kvar_cname, &fx_result->kvar_cname);
   fx_result->kvar_proto = *r_kvar_proto;
   fx_result->kvar_props = *r_kvar_props;
   FX_COPY_PTR(r_kvar_targs, &fx_result->kvar_targs);
   FX_COPY_PTR(r_kvar_cases, &fx_result->kvar_cases);
   FX_COPY_PTR(r_kvar_ctors, &fx_result->kvar_ctors);
   fx_result->kvar_flags = *r_kvar_flags;
   FX_COPY_PTR(r_kvar_ifaces, &fx_result->kvar_ifaces);
   FX_COPY_PTR(r_kvar_scope, &fx_result->kvar_scope);
   fx_result->kvar_loc = *r_kvar_loc;
}

static void _fx_free_rR21K_form__kdefvariant_t(struct _fx_rR21K_form__kdefvariant_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR21K_form__kdefvariant_t, _fx_free_R21K_form__kdefvariant_t);
}

static int _fx_make_rR21K_form__kdefvariant_t(
   struct _fx_R21K_form__kdefvariant_t* arg,
   struct _fx_rR21K_form__kdefvariant_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR21K_form__kdefvariant_t, _fx_copy_R21K_form__kdefvariant_t);
}

static void _fx_free_R17K_form__kdeftyp_t(struct _fx_R17K_form__kdeftyp_t* dst)
{
   fx_free_str(&dst->kt_cname);
   _fx_free_LN14K_form__ktyp_t(&dst->kt_targs);
   _fx_free_N14K_form__ktyp_t(&dst->kt_typ);
   fx_free_list_simple(&dst->kt_scope);
}

static void _fx_copy_R17K_form__kdeftyp_t(struct _fx_R17K_form__kdeftyp_t* src, struct _fx_R17K_form__kdeftyp_t* dst)
{
   dst->kt_name = src->kt_name;
   fx_copy_str(&src->kt_cname, &dst->kt_cname);
   dst->kt_proto = src->kt_proto;
   dst->kt_props = src->kt_props;
   FX_COPY_PTR(src->kt_targs, &dst->kt_targs);
   FX_COPY_PTR(src->kt_typ, &dst->kt_typ);
   FX_COPY_PTR(src->kt_scope, &dst->kt_scope);
   dst->kt_loc = src->kt_loc;
}

static void _fx_make_R17K_form__kdeftyp_t(
   struct _fx_R9Ast__id_t* r_kt_name,
   fx_str_t* r_kt_cname,
   struct _fx_R9Ast__id_t* r_kt_proto,
   struct _fx_Nt6option1R17K_form__ktprops_t* r_kt_props,
   struct _fx_LN14K_form__ktyp_t_data_t* r_kt_targs,
   struct _fx_N14K_form__ktyp_t_data_t* r_kt_typ,
   struct _fx_LN12Ast__scope_t_data_t* r_kt_scope,
   struct _fx_R10Ast__loc_t* r_kt_loc,
   struct _fx_R17K_form__kdeftyp_t* fx_result)
{
   fx_result->kt_name = *r_kt_name;
   fx_copy_str(r_kt_cname, &fx_result->kt_cname);
   fx_result->kt_proto = *r_kt_proto;
   fx_result->kt_props = *r_kt_props;
   FX_COPY_PTR(r_kt_targs, &fx_result->kt_targs);
   FX_COPY_PTR(r_kt_typ, &fx_result->kt_typ);
   FX_COPY_PTR(r_kt_scope, &fx_result->kt_scope);
   fx_result->kt_loc = *r_kt_loc;
}

static void _fx_free_rR17K_form__kdeftyp_t(struct _fx_rR17K_form__kdeftyp_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR17K_form__kdeftyp_t, _fx_free_R17K_form__kdeftyp_t);
}

static int _fx_make_rR17K_form__kdeftyp_t(
   struct _fx_R17K_form__kdeftyp_t* arg,
   struct _fx_rR17K_form__kdeftyp_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR17K_form__kdeftyp_t, _fx_copy_R17K_form__kdeftyp_t);
}

static void _fx_free_R25K_form__kdefclosurevars_t(struct _fx_R25K_form__kdefclosurevars_t* dst)
{
   fx_free_str(&dst->kcv_cname);
   _fx_free_LT2R9Ast__id_tN14K_form__ktyp_t(&dst->kcv_freevars);
   fx_free_list_simple(&dst->kcv_orig_freevars);
   fx_free_list_simple(&dst->kcv_scope);
}

static void _fx_copy_R25K_form__kdefclosurevars_t(
   struct _fx_R25K_form__kdefclosurevars_t* src,
   struct _fx_R25K_form__kdefclosurevars_t* dst)
{
   dst->kcv_name = src->kcv_name;
   fx_copy_str(&src->kcv_cname, &dst->kcv_cname);
   FX_COPY_PTR(src->kcv_freevars, &dst->kcv_freevars);
   FX_COPY_PTR(src->kcv_orig_freevars, &dst->kcv_orig_freevars);
   FX_COPY_PTR(src->kcv_scope, &dst->kcv_scope);
   dst->kcv_loc = src->kcv_loc;
}

static void _fx_make_R25K_form__kdefclosurevars_t(
   struct _fx_R9Ast__id_t* r_kcv_name,
   fx_str_t* r_kcv_cname,
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* r_kcv_freevars,
   struct _fx_LR9Ast__id_t_data_t* r_kcv_orig_freevars,
   struct _fx_LN12Ast__scope_t_data_t* r_kcv_scope,
   struct _fx_R10Ast__loc_t* r_kcv_loc,
   struct _fx_R25K_form__kdefclosurevars_t* fx_result)
{
   fx_result->kcv_name = *r_kcv_name;
   fx_copy_str(r_kcv_cname, &fx_result->kcv_cname);
   FX_COPY_PTR(r_kcv_freevars, &fx_result->kcv_freevars);
   FX_COPY_PTR(r_kcv_orig_freevars, &fx_result->kcv_orig_freevars);
   FX_COPY_PTR(r_kcv_scope, &fx_result->kcv_scope);
   fx_result->kcv_loc = *r_kcv_loc;
}

static void _fx_free_rR25K_form__kdefclosurevars_t(struct _fx_rR25K_form__kdefclosurevars_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR25K_form__kdefclosurevars_t, _fx_free_R25K_form__kdefclosurevars_t);
}

static int _fx_make_rR25K_form__kdefclosurevars_t(
   struct _fx_R25K_form__kdefclosurevars_t* arg,
   struct _fx_rR25K_form__kdefclosurevars_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR25K_form__kdefclosurevars_t, _fx_copy_R25K_form__kdefclosurevars_t);
}

static void _fx_free_N15K_form__kinfo_t(struct _fx_N15K_form__kinfo_t* dst)
{
   switch (dst->tag) {
   case 2:
      _fx_free_R17K_form__kdefval_t(&dst->u.KVal); break;
   case 3:
      _fx_free_rR17K_form__kdeffun_t(&dst->u.KFun); break;
   case 4:
      _fx_free_rR17K_form__kdefexn_t(&dst->u.KExn); break;
   case 5:
      _fx_free_rR21K_form__kdefvariant_t(&dst->u.KVariant); break;
   case 6:
      _fx_free_rR25K_form__kdefclosurevars_t(&dst->u.KClosureVars); break;
   case 7:
      _fx_free_rR23K_form__kdefinterface_t(&dst->u.KInterface); break;
   case 8:
      _fx_free_rR17K_form__kdeftyp_t(&dst->u.KTyp); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_N15K_form__kinfo_t(struct _fx_N15K_form__kinfo_t* src, struct _fx_N15K_form__kinfo_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 2:
      _fx_copy_R17K_form__kdefval_t(&src->u.KVal, &dst->u.KVal); break;
   case 3:
      FX_COPY_PTR(src->u.KFun, &dst->u.KFun); break;
   case 4:
      FX_COPY_PTR(src->u.KExn, &dst->u.KExn); break;
   case 5:
      FX_COPY_PTR(src->u.KVariant, &dst->u.KVariant); break;
   case 6:
      FX_COPY_PTR(src->u.KClosureVars, &dst->u.KClosureVars); break;
   case 7:
      FX_COPY_PTR(src->u.KInterface, &dst->u.KInterface); break;
   case 8:
      FX_COPY_PTR(src->u.KTyp, &dst->u.KTyp); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_Rt24Hashset__hashset_entry_t1S(struct _fx_Rt24Hashset__hashset_entry_t1S* dst)
{
   fx_free_str(&dst->key);
}

static void _fx_copy_Rt24Hashset__hashset_entry_t1S(
   struct _fx_Rt24Hashset__hashset_entry_t1S* src,
   struct _fx_Rt24Hashset__hashset_entry_t1S* dst)
{
   dst->hv = src->hv;
   fx_copy_str(&src->key, &dst->key);
}

static void _fx_make_Rt24Hashset__hashset_entry_t1S(
   uint64_t r_hv,
   fx_str_t* r_key,
   struct _fx_Rt24Hashset__hashset_entry_t1S* fx_result)
{
   fx_result->hv = r_hv;
   fx_copy_str(r_key, &fx_result->key);
}

static void _fx_free_T6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S(
   struct _fx_T6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S* dst)
{
   _fx_free_Rt24Hashset__hashset_entry_t1S(&dst->t0);
   fx_free_arr(&dst->t4);
   fx_free_arr(&dst->t5);
}

static void _fx_copy_T6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S(
   struct _fx_T6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S* src,
   struct _fx_T6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S* dst)
{
   _fx_copy_Rt24Hashset__hashset_entry_t1S(&src->t0, &dst->t0);
   dst->t1 = src->t1;
   dst->t2 = src->t2;
   dst->t3 = src->t3;
   fx_copy_arr(&src->t4, &dst->t4);
   fx_copy_arr(&src->t5, &dst->t5);
}

static void _fx_make_T6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S(
   struct _fx_Rt24Hashset__hashset_entry_t1S* t0,
   int_ t1,
   int_ t2,
   int_ t3,
   fx_arr_t* t4,
   fx_arr_t* t5,
   struct _fx_T6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S* fx_result)
{
   _fx_copy_Rt24Hashset__hashset_entry_t1S(t0, &fx_result->t0);
   fx_result->t1 = t1;
   fx_result->t2 = t2;
   fx_result->t3 = t3;
   fx_copy_arr(t4, &fx_result->t4);
   fx_copy_arr(t5, &fx_result->t5);
}

static void _fx_free_Nt10Hashset__t1S(struct _fx_Nt10Hashset__t1S_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S(&(*dst)->u.t); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t(
   struct _fx_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t* dst)
{
   fx_free_arr(&dst->t4);
   fx_free_arr(&dst->t5);
}

static void _fx_copy_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t(
   struct _fx_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t* src,
   struct _fx_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t* dst)
{
   dst->t0 = src->t0;
   dst->t1 = src->t1;
   dst->t2 = src->t2;
   dst->t3 = src->t3;
   fx_copy_arr(&src->t4, &dst->t4);
   fx_copy_arr(&src->t5, &dst->t5);
}

static void _fx_make_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t(
   struct _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t* t0,
   int_ t1,
   int_ t2,
   int_ t3,
   fx_arr_t* t4,
   fx_arr_t* t5,
   struct _fx_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t* fx_result)
{
   fx_result->t0 = *t0;
   fx_result->t1 = t1;
   fx_result->t2 = t2;
   fx_result->t3 = t3;
   fx_copy_arr(t4, &fx_result->t4);
   fx_copy_arr(t5, &fx_result->t5);
}

static void _fx_free_Nt10Hashset__t1R9Ast__id_t(struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t(&(*dst)->u.t);
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
   struct _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* dst)
{
   _fx_free_Nt11Set__tree_t1R9Ast__id_t(&dst->t1);
   _fx_free_Nt11Set__tree_t1R9Ast__id_t(&dst->t3);
}

static void _fx_copy_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
   struct _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* src,
   struct _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
   FX_COPY_PTR(src->t3, &dst->t3);
}

static void _fx_make_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
   struct _fx_N12Set__color_t* t0,
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* t1,
   struct _fx_R9Ast__id_t* t2,
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* t3,
   struct _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
   FX_COPY_PTR(t3, &fx_result->t3);
}

static void _fx_free_Nt11Set__tree_t1R9Ast__id_t(struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(&(*dst)->u.Node);
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Rt6Set__t1R9Ast__id_t(struct _fx_Rt6Set__t1R9Ast__id_t* dst)
{
   _fx_free_Nt11Set__tree_t1R9Ast__id_t(&dst->root);
   fx_free_fp(&dst->cmp);
}

static void _fx_copy_Rt6Set__t1R9Ast__id_t(struct _fx_Rt6Set__t1R9Ast__id_t* src, struct _fx_Rt6Set__t1R9Ast__id_t* dst)
{
   FX_COPY_PTR(src->root, &dst->root);
   dst->size = src->size;
   FX_COPY_FP(&src->cmp, &dst->cmp);
}

static void _fx_make_Rt6Set__t1R9Ast__id_t(
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* r_root,
   int_ r_size,
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t* r_cmp,
   struct _fx_Rt6Set__t1R9Ast__id_t* fx_result)
{
   FX_COPY_PTR(r_root, &fx_result->root);
   fx_result->size = r_size;
   FX_COPY_FP(r_cmp, &fx_result->cmp);
}

static void _fx_free_T2R10Ast__loc_tS(struct _fx_T2R10Ast__loc_tS* dst)
{
   fx_free_str(&dst->t1);
}

static void _fx_copy_T2R10Ast__loc_tS(struct _fx_T2R10Ast__loc_tS* src, struct _fx_T2R10Ast__loc_tS* dst)
{
   dst->t0 = src->t0;
   fx_copy_str(&src->t1, &dst->t1);
}

static void _fx_make_T2R10Ast__loc_tS(struct _fx_R10Ast__loc_t* t0, fx_str_t* t1, struct _fx_T2R10Ast__loc_tS* fx_result)
{
   fx_result->t0 = *t0;
   fx_copy_str(t1, &fx_result->t1);
}

static void _fx_free_N13Ast__binary_t(struct _fx_N13Ast__binary_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      switch ((*dst)->tag) {
      case 27:
         _fx_free_N13Ast__binary_t(&(*dst)->u.OpAugBinary); break;
      default:
         ;
      }
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_T2SR10Ast__loc_t(struct _fx_T2SR10Ast__loc_t* dst)
{
   fx_free_str(&dst->t0);
}

static void _fx_copy_T2SR10Ast__loc_t(struct _fx_T2SR10Ast__loc_t* src, struct _fx_T2SR10Ast__loc_t* dst)
{
   fx_copy_str(&src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2SR10Ast__loc_t(fx_str_t* t0, struct _fx_R10Ast__loc_t* t1, struct _fx_T2SR10Ast__loc_t* fx_result)
{
   fx_copy_str(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_LT2SR10Ast__loc_t(struct _fx_LT2SR10Ast__loc_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2SR10Ast__loc_t, _fx_free_T2SR10Ast__loc_t);
}

static int _fx_cons_LT2SR10Ast__loc_t(
   struct _fx_T2SR10Ast__loc_t* hd,
   struct _fx_LT2SR10Ast__loc_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2SR10Ast__loc_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2SR10Ast__loc_t, _fx_copy_T2SR10Ast__loc_t);
}

static int _fx_cons_Li(int_ hd, struct _fx_Li_data_t* tl, bool addref_tl, struct _fx_Li_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_Li, FX_COPY_SIMPLE);
}

static int _fx_make_ri(int_ arg, struct _fx_ri_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_ri, FX_COPY_SIMPLE);
}

static void _fx_free_rRt6Set__t1R9Ast__id_t(struct _fx_rRt6Set__t1R9Ast__id_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rRt6Set__t1R9Ast__id_t, _fx_free_Rt6Set__t1R9Ast__id_t);
}

static int _fx_make_rRt6Set__t1R9Ast__id_t(
   struct _fx_Rt6Set__t1R9Ast__id_t* arg,
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rRt6Set__t1R9Ast__id_t, _fx_copy_Rt6Set__t1R9Ast__id_t);
}

static void _fx_free_N14K_form__klit_t(struct _fx_N14K_form__klit_t* dst)
{
   switch (dst->tag) {
   case 5:
      fx_free_str(&dst->u.KLitString); break;
   case 8:
      _fx_free_N14K_form__ktyp_t(&dst->u.KLitNil); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_N14K_form__klit_t(struct _fx_N14K_form__klit_t* src, struct _fx_N14K_form__klit_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 5:
      fx_copy_str(&src->u.KLitString, &dst->u.KLitString); break;
   case 8:
      FX_COPY_PTR(src->u.KLitNil, &dst->u.KLitNil); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_N14K_form__atom_t(struct _fx_N14K_form__atom_t* dst)
{
   switch (dst->tag) {
   case 2:
      _fx_free_N14K_form__klit_t(&dst->u.AtomLit); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_N14K_form__atom_t(struct _fx_N14K_form__atom_t* src, struct _fx_N14K_form__atom_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 2:
      _fx_copy_N14K_form__klit_t(&src->u.AtomLit, &dst->u.AtomLit); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_R22K_form__k_fold_callb_t(struct _fx_R22K_form__k_fold_callb_t* dst)
{
   _fx_free_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t(&dst->kcb_fold_ktyp);
   _fx_free_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t(&dst->kcb_fold_kexp);
   _fx_free_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t(&dst->kcb_fold_atom);
}

static void _fx_copy_R22K_form__k_fold_callb_t(
   struct _fx_R22K_form__k_fold_callb_t* src,
   struct _fx_R22K_form__k_fold_callb_t* dst)
{
   FX_COPY_PTR(src->kcb_fold_ktyp, &dst->kcb_fold_ktyp);
   FX_COPY_PTR(src->kcb_fold_kexp, &dst->kcb_fold_kexp);
   FX_COPY_PTR(src->kcb_fold_atom, &dst->kcb_fold_atom);
}

static void _fx_make_R22K_form__k_fold_callb_t(
   struct _fx_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t* r_kcb_fold_ktyp,
   struct _fx_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t_data_t* r_kcb_fold_kexp,
   struct _fx_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t* r_kcb_fold_atom,
   struct _fx_R22K_form__k_fold_callb_t* fx_result)
{
   FX_COPY_PTR(r_kcb_fold_ktyp, &fx_result->kcb_fold_ktyp);
   FX_COPY_PTR(r_kcb_fold_kexp, &fx_result->kcb_fold_kexp);
   FX_COPY_PTR(r_kcb_fold_atom, &fx_result->kcb_fold_atom);
}

static void _fx_free_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t(
   struct _fx_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      fx_free_fp(&(*dst)->u.Some); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t(
   struct _fx_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      fx_free_fp(&(*dst)->u.Some); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t(
   struct _fx_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      fx_free_fp(&(*dst)->u.Some); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Nt6option1N14K_form__atom_t(struct _fx_Nt6option1N14K_form__atom_t* dst)
{
   switch (dst->tag) {
   case 2:
      _fx_free_N14K_form__atom_t(&dst->u.Some); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_Nt6option1N14K_form__atom_t(
   struct _fx_Nt6option1N14K_form__atom_t* src,
   struct _fx_Nt6option1N14K_form__atom_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 2:
      _fx_copy_N14K_form__atom_t(&src->u.Some, &dst->u.Some); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_LN14K_form__kexp_t(struct _fx_LN14K_form__kexp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LN14K_form__kexp_t, _fx_free_N14K_form__kexp_t);
}

static int _fx_cons_LN14K_form__kexp_t(
   struct _fx_N14K_form__kexp_t_data_t* hd,
   struct _fx_LN14K_form__kexp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN14K_form__kexp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN14K_form__kexp_t, FX_COPY_PTR);
}

static void _fx_free_T2BN14K_form__atom_t(struct _fx_T2BN14K_form__atom_t* dst)
{
   _fx_free_N14K_form__atom_t(&dst->t1);
}

static void _fx_copy_T2BN14K_form__atom_t(struct _fx_T2BN14K_form__atom_t* src, struct _fx_T2BN14K_form__atom_t* dst)
{
   dst->t0 = src->t0;
   _fx_copy_N14K_form__atom_t(&src->t1, &dst->t1);
}

static void _fx_make_T2BN14K_form__atom_t(bool t0, struct _fx_N14K_form__atom_t* t1, struct _fx_T2BN14K_form__atom_t* fx_result)
{
   fx_result->t0 = t0;
   _fx_copy_N14K_form__atom_t(t1, &fx_result->t1);
}

static void _fx_free_LT2BN14K_form__atom_t(struct _fx_LT2BN14K_form__atom_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2BN14K_form__atom_t, _fx_free_T2BN14K_form__atom_t);
}

static int _fx_cons_LT2BN14K_form__atom_t(
   struct _fx_T2BN14K_form__atom_t* hd,
   struct _fx_LT2BN14K_form__atom_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2BN14K_form__atom_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2BN14K_form__atom_t, _fx_copy_T2BN14K_form__atom_t);
}

static void _fx_free_T2LN14K_form__ktyp_tN14K_form__ktyp_t(struct _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t* dst)
{
   _fx_free_LN14K_form__ktyp_t(&dst->t0);
   _fx_free_N14K_form__ktyp_t(&dst->t1);
}

static void _fx_copy_T2LN14K_form__ktyp_tN14K_form__ktyp_t(
   struct _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t* src,
   struct _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2LN14K_form__ktyp_tN14K_form__ktyp_t(
   struct _fx_LN14K_form__ktyp_t_data_t* t0,
   struct _fx_N14K_form__ktyp_t_data_t* t1,
   struct _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t(struct _fx_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t* dst)
{
   _fx_free_LT2R9Ast__id_tN14K_form__ktyp_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t(
   struct _fx_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t* src,
   struct _fx_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* t1,
   struct _fx_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_T2iN14K_form__ktyp_t(struct _fx_T2iN14K_form__ktyp_t* dst)
{
   _fx_free_N14K_form__ktyp_t(&dst->t1);
}

static void _fx_copy_T2iN14K_form__ktyp_t(struct _fx_T2iN14K_form__ktyp_t* src, struct _fx_T2iN14K_form__ktyp_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2iN14K_form__ktyp_t(
   int_ t0,
   struct _fx_N14K_form__ktyp_t_data_t* t1,
   struct _fx_T2iN14K_form__ktyp_t* fx_result)
{
   fx_result->t0 = t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_N14K_form__ktyp_t(struct _fx_N14K_form__ktyp_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      switch ((*dst)->tag) {
      case 12:
         _fx_free_N14K_form__ktyp_t(&(*dst)->u.KTypRawPointer); break;
      case 13:
         _fx_free_T2LN14K_form__ktyp_tN14K_form__ktyp_t(&(*dst)->u.KTypFun); break;
      case 14:
         _fx_free_LN14K_form__ktyp_t(&(*dst)->u.KTypTuple); break;
      case 15:
         _fx_free_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t(&(*dst)->u.KTypRecord); break;
      case 17:
         _fx_free_T2iN14K_form__ktyp_t(&(*dst)->u.KTypArray); break;
      case 18:
         _fx_free_N14K_form__ktyp_t(&(*dst)->u.KTypVector); break;
      case 19:
         _fx_free_N14K_form__ktyp_t(&(*dst)->u.KTypList); break;
      case 20:
         _fx_free_N14K_form__ktyp_t(&(*dst)->u.KTypRef); break;
      default:
         ;
      }
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Ta3N14K_form__atom_t(struct _fx_Ta3N14K_form__atom_t* dst)
{
   _fx_free_N14K_form__atom_t(&dst->t0);
   _fx_free_N14K_form__atom_t(&dst->t1);
   _fx_free_N14K_form__atom_t(&dst->t2);
}

static void _fx_copy_Ta3N14K_form__atom_t(struct _fx_Ta3N14K_form__atom_t* src, struct _fx_Ta3N14K_form__atom_t* dst)
{
   _fx_copy_N14K_form__atom_t(&src->t0, &dst->t0);
   _fx_copy_N14K_form__atom_t(&src->t1, &dst->t1);
   _fx_copy_N14K_form__atom_t(&src->t2, &dst->t2);
}

static void _fx_make_Ta3N14K_form__atom_t(
   struct _fx_N14K_form__atom_t* t0,
   struct _fx_N14K_form__atom_t* t1,
   struct _fx_N14K_form__atom_t* t2,
   struct _fx_Ta3N14K_form__atom_t* fx_result)
{
   _fx_copy_N14K_form__atom_t(t0, &fx_result->t0);
   _fx_copy_N14K_form__atom_t(t1, &fx_result->t1);
   _fx_copy_N14K_form__atom_t(t2, &fx_result->t2);
}

static void _fx_free_N13K_form__dom_t(struct _fx_N13K_form__dom_t* dst)
{
   switch (dst->tag) {
   case 1:
      _fx_free_N14K_form__atom_t(&dst->u.DomainElem); break;
   case 2:
      _fx_free_N14K_form__atom_t(&dst->u.DomainFast); break;
   case 3:
      _fx_free_Ta3N14K_form__atom_t(&dst->u.DomainRange); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_N13K_form__dom_t(struct _fx_N13K_form__dom_t* src, struct _fx_N13K_form__dom_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 1:
      _fx_copy_N14K_form__atom_t(&src->u.DomainElem, &dst->u.DomainElem); break;
   case 2:
      _fx_copy_N14K_form__atom_t(&src->u.DomainFast, &dst->u.DomainFast); break;
   case 3:
      _fx_copy_Ta3N14K_form__atom_t(&src->u.DomainRange, &dst->u.DomainRange); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_T2Nt6option1N14K_form__atom_tR10Ast__loc_t(struct _fx_T2Nt6option1N14K_form__atom_tR10Ast__loc_t* dst)
{
   _fx_free_Nt6option1N14K_form__atom_t(&dst->t0);
}

static void _fx_copy_T2Nt6option1N14K_form__atom_tR10Ast__loc_t(
   struct _fx_T2Nt6option1N14K_form__atom_tR10Ast__loc_t* src,
   struct _fx_T2Nt6option1N14K_form__atom_tR10Ast__loc_t* dst)
{
   _fx_copy_Nt6option1N14K_form__atom_t(&src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2Nt6option1N14K_form__atom_tR10Ast__loc_t(
   struct _fx_Nt6option1N14K_form__atom_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2Nt6option1N14K_form__atom_tR10Ast__loc_t* fx_result)
{
   _fx_copy_Nt6option1N14K_form__atom_t(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__ktyp_t(&dst->t0);
}

static void _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__ktyp_t_data_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__atom_t(&dst->t0);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_copy_N14K_form__atom_t(&src->t0, &dst->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__atom_t* t0,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t1,
   struct _fx_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   _fx_copy_N14K_form__atom_t(t0, &fx_result->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N13Ast__binary_t(&dst->t0);
   _fx_free_N14K_form__atom_t(&dst->t1);
   _fx_free_N14K_form__atom_t(&dst->t2);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t3);
}

static void _fx_copy_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   _fx_copy_N14K_form__atom_t(&src->t1, &dst->t1);
   _fx_copy_N14K_form__atom_t(&src->t2, &dst->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void _fx_make_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N13Ast__binary_t_data_t* t0,
   struct _fx_N14K_form__atom_t* t1,
   struct _fx_N14K_form__atom_t* t2,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t3,
   struct _fx_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   _fx_copy_N14K_form__atom_t(t1, &fx_result->t1);
   _fx_copy_N14K_form__atom_t(t2, &fx_result->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__atom_t(&dst->t1);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   _fx_copy_N14K_form__atom_t(&src->t1, &dst->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N12Ast__unary_t* t0,
   struct _fx_N14K_form__atom_t* t1,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t2,
   struct _fx_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   _fx_copy_N14K_form__atom_t(t1, &fx_result->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_LN14K_form__atom_t(struct _fx_LN14K_form__atom_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LN14K_form__atom_t, _fx_free_N14K_form__atom_t);
}

static int _fx_cons_LN14K_form__atom_t(
   struct _fx_N14K_form__atom_t* hd,
   struct _fx_LN14K_form__atom_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN14K_form__atom_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN14K_form__atom_t, _fx_copy_N14K_form__atom_t);
}

static void _fx_free_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LN14K_form__atom_t(&dst->t1);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N13Ast__intrin_t* t0,
   struct _fx_LN14K_form__atom_t_data_t* t1,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t2,
   struct _fx_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T2R9Ast__id_tN14K_form__kexp_t(struct _fx_T2R9Ast__id_tN14K_form__kexp_t* dst)
{
   _fx_free_N14K_form__kexp_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tN14K_form__kexp_t(
   struct _fx_T2R9Ast__id_tN14K_form__kexp_t* src,
   struct _fx_T2R9Ast__id_tN14K_form__kexp_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tN14K_form__kexp_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N14K_form__kexp_t_data_t* t1,
   struct _fx_T2R9Ast__id_tN14K_form__kexp_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LN14K_form__kexp_t(&dst->t0);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_LN14K_form__kexp_t_data_t* t0,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t1,
   struct _fx_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__kexp_t(&dst->t0);
   _fx_free_N14K_form__kexp_t(&dst->t1);
   _fx_free_N14K_form__kexp_t(&dst->t2);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t3);
}

static void _fx_copy_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void _fx_make_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__kexp_t_data_t* t0,
   struct _fx_N14K_form__kexp_t_data_t* t1,
   struct _fx_N14K_form__kexp_t_data_t* t2,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t3,
   struct _fx_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LN14K_form__atom_t(&dst->t1);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_LN14K_form__atom_t_data_t* t1,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t2,
   struct _fx_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LN14K_form__atom_t(&dst->t2);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t3);
}

static void _fx_copy_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   dst->t1 = src->t1;
   FX_COPY_PTR(src->t2, &dst->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void _fx_make_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   int_ t1,
   struct _fx_LN14K_form__atom_t_data_t* t2,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t3,
   struct _fx_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   fx_result->t1 = t1;
   FX_COPY_PTR(t2, &fx_result->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LN14K_form__atom_t(&dst->t0);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_LN14K_form__atom_t_data_t* t0,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t1,
   struct _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LN14K_form__atom_t(&dst->t2);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t3);
}

static void _fx_copy_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   dst->t1 = src->t1;
   FX_COPY_PTR(src->t2, &dst->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void _fx_make_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_R9Ast__id_t* t1,
   struct _fx_LN14K_form__atom_t_data_t* t2,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t3,
   struct _fx_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   fx_result->t1 = *t1;
   FX_COPY_PTR(t2, &fx_result->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_LLT2BN14K_form__atom_t(struct _fx_LLT2BN14K_form__atom_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LLT2BN14K_form__atom_t, _fx_free_LT2BN14K_form__atom_t);
}

static int _fx_cons_LLT2BN14K_form__atom_t(
   struct _fx_LT2BN14K_form__atom_t_data_t* hd,
   struct _fx_LLT2BN14K_form__atom_t_data_t* tl,
   bool addref_tl,
   struct _fx_LLT2BN14K_form__atom_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LLT2BN14K_form__atom_t, FX_COPY_PTR);
}

static void _fx_free_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LLT2BN14K_form__atom_t(&dst->t1);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   bool t0,
   struct _fx_LLT2BN14K_form__atom_t_data_t* t1,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t2,
   struct _fx_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LT2BN14K_form__atom_t(&dst->t0);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_LT2BN14K_form__atom_t_data_t* t0,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t1,
   struct _fx_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_LN13K_form__dom_t(struct _fx_LN13K_form__dom_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LN13K_form__dom_t, _fx_free_N13K_form__dom_t);
}

static int _fx_cons_LN13K_form__dom_t(
   struct _fx_N13K_form__dom_t* hd,
   struct _fx_LN13K_form__dom_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN13K_form__dom_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN13K_form__dom_t, _fx_copy_N13K_form__dom_t);
}

static void _fx_free_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__atom_t(&dst->t0);
   _fx_free_LN13K_form__dom_t(&dst->t3);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t4);
}

static void _fx_copy_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_copy_N14K_form__atom_t(&src->t0, &dst->t0);
   dst->t1 = src->t1;
   dst->t2 = src->t2;
   FX_COPY_PTR(src->t3, &dst->t3);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t4, &dst->t4);
}

static void _fx_make_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__atom_t* t0,
   struct _fx_N13Ast__border_t* t1,
   struct _fx_N18Ast__interpolate_t* t2,
   struct _fx_LN13K_form__dom_t_data_t* t3,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t4,
   struct _fx_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t*
      fx_result)
{
   _fx_copy_N14K_form__atom_t(t0, &fx_result->t0);
   fx_result->t1 = *t1;
   fx_result->t2 = *t2;
   FX_COPY_PTR(t3, &fx_result->t3);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t4, &fx_result->t4);
}

static void _fx_free_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   dst->t1 = src->t1;
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   int_ t1,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t2,
   struct _fx_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   fx_result->t1 = t1;
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t(struct _fx_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__atom_t(&dst->t1);
}

static void _fx_copy_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t(
   struct _fx_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t* src,
   struct _fx_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   _fx_copy_N14K_form__atom_t(&src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N14K_form__atom_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   _fx_copy_N14K_form__atom_t(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T2LN14K_form__kexp_tN14K_form__kexp_t(struct _fx_T2LN14K_form__kexp_tN14K_form__kexp_t* dst)
{
   _fx_free_LN14K_form__kexp_t(&dst->t0);
   _fx_free_N14K_form__kexp_t(&dst->t1);
}

static void _fx_copy_T2LN14K_form__kexp_tN14K_form__kexp_t(
   struct _fx_T2LN14K_form__kexp_tN14K_form__kexp_t* src,
   struct _fx_T2LN14K_form__kexp_tN14K_form__kexp_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2LN14K_form__kexp_tN14K_form__kexp_t(
   struct _fx_LN14K_form__kexp_t_data_t* t0,
   struct _fx_N14K_form__kexp_t_data_t* t1,
   struct _fx_T2LN14K_form__kexp_tN14K_form__kexp_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2LN14K_form__kexp_tN14K_form__kexp_t(struct _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2LN14K_form__kexp_tN14K_form__kexp_t, _fx_free_T2LN14K_form__kexp_tN14K_form__kexp_t);
}

static int _fx_cons_LT2LN14K_form__kexp_tN14K_form__kexp_t(
   struct _fx_T2LN14K_form__kexp_tN14K_form__kexp_t* hd,
   struct _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2LN14K_form__kexp_tN14K_form__kexp_t, _fx_copy_T2LN14K_form__kexp_tN14K_form__kexp_t);
}

static void _fx_free_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LT2LN14K_form__kexp_tN14K_form__kexp_t(&dst->t0);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t* t0,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t1,
   struct _fx_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__kexp_t(&dst->t0);
   _fx_free_N14K_form__kexp_t(&dst->t1);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__kexp_t_data_t* t0,
   struct _fx_N14K_form__kexp_t_data_t* t1,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t2,
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__atom_t(&dst->t0);
   _fx_free_N14K_form__ktyp_t(&dst->t1);
}

static void _fx_copy_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_copy_N14K_form__atom_t(&src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__atom_t* t0,
   struct _fx_N14K_form__ktyp_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   _fx_copy_N14K_form__atom_t(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T2R9Ast__id_tN13K_form__dom_t(struct _fx_T2R9Ast__id_tN13K_form__dom_t* dst)
{
   _fx_free_N13K_form__dom_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tN13K_form__dom_t(
   struct _fx_T2R9Ast__id_tN13K_form__dom_t* src,
   struct _fx_T2R9Ast__id_tN13K_form__dom_t* dst)
{
   dst->t0 = src->t0;
   _fx_copy_N13K_form__dom_t(&src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tN13K_form__dom_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N13K_form__dom_t* t1,
   struct _fx_T2R9Ast__id_tN13K_form__dom_t* fx_result)
{
   fx_result->t0 = *t0;
   _fx_copy_N13K_form__dom_t(t1, &fx_result->t1);
}

static void _fx_free_LT2R9Ast__id_tN13K_form__dom_t(struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2R9Ast__id_tN13K_form__dom_t, _fx_free_T2R9Ast__id_tN13K_form__dom_t);
}

static int _fx_cons_LT2R9Ast__id_tN13K_form__dom_t(
   struct _fx_T2R9Ast__id_tN13K_form__dom_t* hd,
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2R9Ast__id_tN13K_form__dom_t, _fx_copy_T2R9Ast__id_tN13K_form__dom_t);
}

static void _fx_free_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t(
   struct _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t* dst)
{
   _fx_free_N14K_form__kexp_t(&dst->t0);
   _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&dst->t1);
   fx_free_list_simple(&dst->t2);
}

static void _fx_copy_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t(
   struct _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t* src,
   struct _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
}

static void _fx_make_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t(
   struct _fx_N14K_form__kexp_t_data_t* t0,
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* t1,
   struct _fx_LR9Ast__id_t_data_t* t2,
   struct _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
}

static void _fx_free_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t(
   struct _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t,
      _fx_free_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t);
}

static int _fx_cons_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t(
   struct _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t* hd,
   struct _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t,
      _fx_copy_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t);
}

static void
   _fx_free_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t*
      dst)
{
   _fx_free_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t(&dst->t0);
   _fx_free_N14K_form__kexp_t(&dst->t1);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t3);
}

static void
   _fx_copy_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t*
      src,
   struct _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t*
      dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void
   _fx_make_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t* t0,
   struct _fx_N14K_form__kexp_t_data_t* t1,
   struct _fx_R16Ast__for_flags_t* t2,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t3,
   struct _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t*
      fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t(
   struct _fx_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t* dst)
{
   _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&dst->t0);
   fx_free_list_simple(&dst->t1);
   _fx_free_N14K_form__kexp_t(&dst->t2);
}

static void _fx_copy_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t(
   struct _fx_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t* src,
   struct _fx_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
   dst->t3 = src->t3;
   dst->t4 = src->t4;
}

static void _fx_make_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t(
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* t0,
   struct _fx_LR9Ast__id_t_data_t* t1,
   struct _fx_N14K_form__kexp_t_data_t* t2,
   struct _fx_R16Ast__for_flags_t* t3,
   struct _fx_R10Ast__loc_t* t4,
   struct _fx_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
   fx_result->t3 = *t3;
   fx_result->t4 = *t4;
}

static void _fx_free_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t(
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__kexp_t(&dst->t0);
   _fx_free_N14K_form__kexp_t(&dst->t1);
}

static void _fx_copy_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t(
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t* src,
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t(
   struct _fx_N14K_form__kexp_t_data_t* t0,
   struct _fx_N14K_form__kexp_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T2ST2N14K_form__ktyp_tR10Ast__loc_t(struct _fx_T2ST2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   fx_free_str(&dst->t0);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2ST2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2ST2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T2ST2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   fx_copy_str(&src->t0, &dst->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2ST2N14K_form__ktyp_tR10Ast__loc_t(
   fx_str_t* t0,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t1,
   struct _fx_T2ST2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_copy_str(t0, &fx_result->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t(struct _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__kexp_t(&dst->t1);
}

static void _fx_copy_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t(
   struct _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t* src,
   struct _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N14K_form__kexp_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_N14K_form__kexp_t(struct _fx_N14K_form__kexp_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      switch ((*dst)->tag) {
      case 4:
         _fx_free_T2Nt6option1N14K_form__atom_tR10Ast__loc_t(&(*dst)->u.KExpReturn); break;
      case 5:
         _fx_free_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpAtom); break;
      case 6:
         _fx_free_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpBinary);
         break;
      case 7:
         _fx_free_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpUnary); break;
      case 8:
         _fx_free_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpIntrin); break;
      case 9:
         _fx_free_T2R9Ast__id_tN14K_form__kexp_t(&(*dst)->u.KExpSync); break;
      case 10:
         _fx_free_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpSeq); break;
      case 11:
         _fx_free_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpIf);
         break;
      case 12:
         _fx_free_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpCall); break;
      case 13:
         _fx_free_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpICall); break;
      case 14:
         _fx_free_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpMkTuple); break;
      case 15:
         _fx_free_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpMkRecord); break;
      case 16:
         _fx_free_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpMkClosure); break;
      case 17:
         _fx_free_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpMkArray); break;
      case 18:
         _fx_free_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpMkVector); break;
      case 19:
         _fx_free_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t(
            &(*dst)->u.KExpAt);
         break;
      case 20:
         _fx_free_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpMem); break;
      case 21:
         _fx_free_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t(&(*dst)->u.KExpAssign); break;
      case 22:
         _fx_free_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpMatch); break;
      case 23:
         _fx_free_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpTryCatch); break;
      case 25:
         _fx_free_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpCast); break;
      case 26:
         _fx_free_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t(
            &(*dst)->u.KExpMap);
         break;
      case 27:
         _fx_free_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t(
            &(*dst)->u.KExpFor);
         break;
      case 28:
         _fx_free_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t(&(*dst)->u.KExpWhile); break;
      case 29:
         _fx_free_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t(&(*dst)->u.KExpDoWhile); break;
      case 30:
         _fx_free_T2ST2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpCCode); break;
      case 31:
         _fx_free_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t(&(*dst)->u.KDefVal); break;
      case 32:
         _fx_free_rR17K_form__kdeffun_t(&(*dst)->u.KDefFun); break;
      case 33:
         _fx_free_rR17K_form__kdefexn_t(&(*dst)->u.KDefExn); break;
      case 34:
         _fx_free_rR21K_form__kdefvariant_t(&(*dst)->u.KDefVariant); break;
      case 35:
         _fx_free_rR23K_form__kdefinterface_t(&(*dst)->u.KDefInterface); break;
      case 36:
         _fx_free_rR17K_form__kdeftyp_t(&(*dst)->u.KDefTyp); break;
      case 37:
         _fx_free_rR25K_form__kdefclosurevars_t(&(*dst)->u.KDefClosureVars); break;
      default:
         ;
      }
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_R14Ast__pragmas_t(struct _fx_R14Ast__pragmas_t* dst)
{
   _fx_free_LT2SR10Ast__loc_t(&dst->pragma_clibs);
}

static void _fx_copy_R14Ast__pragmas_t(struct _fx_R14Ast__pragmas_t* src, struct _fx_R14Ast__pragmas_t* dst)
{
   dst->pragma_cpp = src->pragma_cpp;
   FX_COPY_PTR(src->pragma_clibs, &dst->pragma_clibs);
}

static void _fx_make_R14Ast__pragmas_t(
   bool r_pragma_cpp,
   struct _fx_LT2SR10Ast__loc_t_data_t* r_pragma_clibs,
   struct _fx_R14Ast__pragmas_t* fx_result)
{
   fx_result->pragma_cpp = r_pragma_cpp;
   FX_COPY_PTR(r_pragma_clibs, &fx_result->pragma_clibs);
}

static void _fx_free_R17K_form__kmodule_t(struct _fx_R17K_form__kmodule_t* dst)
{
   fx_free_str(&dst->km_cname);
   _fx_free_LN14K_form__kexp_t(&dst->km_top);
   fx_free_list_simple(&dst->km_deps);
   _fx_free_R14Ast__pragmas_t(&dst->km_pragmas);
}

static void _fx_copy_R17K_form__kmodule_t(struct _fx_R17K_form__kmodule_t* src, struct _fx_R17K_form__kmodule_t* dst)
{
   dst->km_name = src->km_name;
   dst->km_idx = src->km_idx;
   dst->km_toposort_idx = src->km_toposort_idx;
   fx_copy_str(&src->km_cname, &dst->km_cname);
   FX_COPY_PTR(src->km_top, &dst->km_top);
   FX_COPY_PTR(src->km_deps, &dst->km_deps);
   dst->km_skip = src->km_skip;
   dst->km_main = src->km_main;
   _fx_copy_R14Ast__pragmas_t(&src->km_pragmas, &dst->km_pragmas);
}

static void _fx_make_R17K_form__kmodule_t(
   struct _fx_R9Ast__id_t* r_km_name,
   int_ r_km_idx,
   int_ r_km_toposort_idx,
   fx_str_t* r_km_cname,
   struct _fx_LN14K_form__kexp_t_data_t* r_km_top,
   struct _fx_Li_data_t* r_km_deps,
   bool r_km_skip,
   bool r_km_main,
   struct _fx_R14Ast__pragmas_t* r_km_pragmas,
   struct _fx_R17K_form__kmodule_t* fx_result)
{
   fx_result->km_name = *r_km_name;
   fx_result->km_idx = r_km_idx;
   fx_result->km_toposort_idx = r_km_toposort_idx;
   fx_copy_str(r_km_cname, &fx_result->km_cname);
   FX_COPY_PTR(r_km_top, &fx_result->km_top);
   FX_COPY_PTR(r_km_deps, &fx_result->km_deps);
   fx_result->km_skip = r_km_skip;
   fx_result->km_main = r_km_main;
   _fx_copy_R14Ast__pragmas_t(r_km_pragmas, &fx_result->km_pragmas);
}

static void _fx_free_LR17K_form__kmodule_t(struct _fx_LR17K_form__kmodule_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LR17K_form__kmodule_t, _fx_free_R17K_form__kmodule_t);
}

static int _fx_cons_LR17K_form__kmodule_t(
   struct _fx_R17K_form__kmodule_t* hd,
   struct _fx_LR17K_form__kmodule_t_data_t* tl,
   bool addref_tl,
   struct _fx_LR17K_form__kmodule_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LR17K_form__kmodule_t, _fx_copy_R17K_form__kmodule_t);
}

static void _fx_free_rNt10Hashset__t1R9Ast__id_t(struct _fx_rNt10Hashset__t1R9Ast__id_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rNt10Hashset__t1R9Ast__id_t, _fx_free_Nt10Hashset__t1R9Ast__id_t);
}

static int _fx_make_rNt10Hashset__t1R9Ast__id_t(
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* arg,
   struct _fx_rNt10Hashset__t1R9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rNt10Hashset__t1R9Ast__id_t, FX_COPY_PTR);
}

static void _fx_free_R22C_form__c_fold_callb_t(struct _fx_R22C_form__c_fold_callb_t* dst)
{
   _fx_free_Nt6option1FPv2R9Ast__id_tR22C_form__c_fold_callb_t(&dst->ccb_fold_ident);
   _fx_free_Nt6option1FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t(&dst->ccb_fold_typ);
   _fx_free_Nt6option1FPv2N14C_form__cexp_tR22C_form__c_fold_callb_t(&dst->ccb_fold_exp);
   _fx_free_Nt6option1FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t(&dst->ccb_fold_stmt);
}

static void _fx_copy_R22C_form__c_fold_callb_t(
   struct _fx_R22C_form__c_fold_callb_t* src,
   struct _fx_R22C_form__c_fold_callb_t* dst)
{
   FX_COPY_PTR(src->ccb_fold_ident, &dst->ccb_fold_ident);
   FX_COPY_PTR(src->ccb_fold_typ, &dst->ccb_fold_typ);
   FX_COPY_PTR(src->ccb_fold_exp, &dst->ccb_fold_exp);
   FX_COPY_PTR(src->ccb_fold_stmt, &dst->ccb_fold_stmt);
}

static void _fx_make_R22C_form__c_fold_callb_t(
   struct _fx_Nt6option1FPv2R9Ast__id_tR22C_form__c_fold_callb_t_data_t* r_ccb_fold_ident,
   struct _fx_Nt6option1FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t_data_t* r_ccb_fold_typ,
   struct _fx_Nt6option1FPv2N14C_form__cexp_tR22C_form__c_fold_callb_t_data_t* r_ccb_fold_exp,
   struct _fx_Nt6option1FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t_data_t* r_ccb_fold_stmt,
   struct _fx_R22C_form__c_fold_callb_t* fx_result)
{
   FX_COPY_PTR(r_ccb_fold_ident, &fx_result->ccb_fold_ident);
   FX_COPY_PTR(r_ccb_fold_typ, &fx_result->ccb_fold_typ);
   FX_COPY_PTR(r_ccb_fold_exp, &fx_result->ccb_fold_exp);
   FX_COPY_PTR(r_ccb_fold_stmt, &fx_result->ccb_fold_stmt);
}

static void _fx_free_Nt6option1FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t(
   struct _fx_Nt6option1FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      fx_free_fp(&(*dst)->u.Some); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Nt6option1FPv2N14C_form__cexp_tR22C_form__c_fold_callb_t(
   struct _fx_Nt6option1FPv2N14C_form__cexp_tR22C_form__c_fold_callb_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      fx_free_fp(&(*dst)->u.Some); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Nt6option1FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t(
   struct _fx_Nt6option1FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      fx_free_fp(&(*dst)->u.Some); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Nt6option1FPv2R9Ast__id_tR22C_form__c_fold_callb_t(
   struct _fx_Nt6option1FPv2R9Ast__id_tR22C_form__c_fold_callb_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      fx_free_fp(&(*dst)->u.Some); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Nt6option1N14C_form__ctyp_t(struct _fx_Nt6option1N14C_form__ctyp_t* dst)
{
   switch (dst->tag) {
   case 2:
      _fx_free_N14C_form__ctyp_t(&dst->u.Some); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_Nt6option1N14C_form__ctyp_t(
   struct _fx_Nt6option1N14C_form__ctyp_t* src,
   struct _fx_Nt6option1N14C_form__ctyp_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 2:
      FX_COPY_PTR(src->u.Some, &dst->u.Some); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_T2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t(
   struct _fx_T2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t* dst)
{
   _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&dst->t1);
}

static void _fx_copy_T2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t(
   struct _fx_T2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t* src,
   struct _fx_T2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t(
   struct _fx_Nt6option1R9Ast__id_t* t0,
   struct _fx_LT2R9Ast__id_tN14C_form__ctyp_t_data_t* t1,
   struct _fx_T2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LN14C_form__ctyp_t(struct _fx_LN14C_form__ctyp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LN14C_form__ctyp_t, _fx_free_N14C_form__ctyp_t);
}

static int _fx_cons_LN14C_form__ctyp_t(
   struct _fx_N14C_form__ctyp_t_data_t* hd,
   struct _fx_LN14C_form__ctyp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN14C_form__ctyp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN14C_form__ctyp_t, FX_COPY_PTR);
}

static void _fx_free_T2LN14C_form__ctyp_tN14C_form__ctyp_t(struct _fx_T2LN14C_form__ctyp_tN14C_form__ctyp_t* dst)
{
   _fx_free_LN14C_form__ctyp_t(&dst->t0);
   _fx_free_N14C_form__ctyp_t(&dst->t1);
}

static void _fx_copy_T2LN14C_form__ctyp_tN14C_form__ctyp_t(
   struct _fx_T2LN14C_form__ctyp_tN14C_form__ctyp_t* src,
   struct _fx_T2LN14C_form__ctyp_tN14C_form__ctyp_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2LN14C_form__ctyp_tN14C_form__ctyp_t(
   struct _fx_LN14C_form__ctyp_t_data_t* t0,
   struct _fx_N14C_form__ctyp_t_data_t* t1,
   struct _fx_T2LN14C_form__ctyp_tN14C_form__ctyp_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
}

static int _fx_cons_LN19C_form__ctyp_attr_t(
   struct _fx_N19C_form__ctyp_attr_t* hd,
   struct _fx_LN19C_form__ctyp_attr_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN19C_form__ctyp_attr_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN19C_form__ctyp_attr_t, FX_COPY_SIMPLE_BY_PTR);
}

static void _fx_free_T2LN19C_form__ctyp_attr_tN14C_form__ctyp_t(struct _fx_T2LN19C_form__ctyp_attr_tN14C_form__ctyp_t* dst)
{
   fx_free_list_simple(&dst->t0);
   _fx_free_N14C_form__ctyp_t(&dst->t1);
}

static void _fx_copy_T2LN19C_form__ctyp_attr_tN14C_form__ctyp_t(
   struct _fx_T2LN19C_form__ctyp_attr_tN14C_form__ctyp_t* src,
   struct _fx_T2LN19C_form__ctyp_attr_tN14C_form__ctyp_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2LN19C_form__ctyp_attr_tN14C_form__ctyp_t(
   struct _fx_LN19C_form__ctyp_attr_t_data_t* t0,
   struct _fx_N14C_form__ctyp_t_data_t* t1,
   struct _fx_T2LN19C_form__ctyp_attr_tN14C_form__ctyp_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_T2iN14C_form__ctyp_t(struct _fx_T2iN14C_form__ctyp_t* dst)
{
   _fx_free_N14C_form__ctyp_t(&dst->t1);
}

static void _fx_copy_T2iN14C_form__ctyp_t(struct _fx_T2iN14C_form__ctyp_t* src, struct _fx_T2iN14C_form__ctyp_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2iN14C_form__ctyp_t(
   int_ t0,
   struct _fx_N14C_form__ctyp_t_data_t* t1,
   struct _fx_T2iN14C_form__ctyp_t* fx_result)
{
   fx_result->t0 = t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_N14C_form__ctyp_t(struct _fx_N14C_form__ctyp_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      switch ((*dst)->tag) {
      case 14:
         _fx_free_T2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t(&(*dst)->u.CTypStruct); break;
      case 15:
         _fx_free_T2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t(&(*dst)->u.CTypUnion); break;
      case 16:
         _fx_free_T2LN14C_form__ctyp_tN14C_form__ctyp_t(&(*dst)->u.CTypFunRawPtr); break;
      case 17:
         _fx_free_T2LN19C_form__ctyp_attr_tN14C_form__ctyp_t(&(*dst)->u.CTypRawPtr); break;
      case 18:
         _fx_free_T2LN19C_form__ctyp_attr_tN14C_form__ctyp_t(&(*dst)->u.CTypRawArray); break;
      case 19:
         _fx_free_T2iN14C_form__ctyp_t(&(*dst)->u.CTypArray); break;
      case 20:
         _fx_free_N14C_form__ctyp_t(&(*dst)->u.CTypVector); break;
      default:
         ;
      }
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14C_form__ctyp_t(&dst->t0);
}

static void _fx_copy_T2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t* src,
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_N14C_form__ctyp_t_data_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_T2R9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_T2R9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t* dst)
{
   _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_T2R9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t* src,
   struct _fx_T2R9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   _fx_copy_T2N14C_form__ctyp_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t* t1,
   struct _fx_T2R9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   _fx_copy_T2N14C_form__ctyp_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_T2N14K_form__klit_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_T2N14K_form__klit_tT2N14C_form__ctyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__klit_t(&dst->t0);
   _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2N14K_form__klit_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_T2N14K_form__klit_tT2N14C_form__ctyp_tR10Ast__loc_t* src,
   struct _fx_T2N14K_form__klit_tT2N14C_form__ctyp_tR10Ast__loc_t* dst)
{
   _fx_copy_N14K_form__klit_t(&src->t0, &dst->t0);
   _fx_copy_T2N14C_form__ctyp_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2N14K_form__klit_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_N14K_form__klit_t* t0,
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t* t1,
   struct _fx_T2N14K_form__klit_tT2N14C_form__ctyp_tR10Ast__loc_t* fx_result)
{
   _fx_copy_N14K_form__klit_t(t0, &fx_result->t0);
   _fx_copy_T2N14C_form__ctyp_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_T4N17C_form__cbinary_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_T4N17C_form__cbinary_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14C_form__cexp_t(&dst->t1);
   _fx_free_N14C_form__cexp_t(&dst->t2);
   _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&dst->t3);
}

static void _fx_copy_T4N17C_form__cbinary_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_T4N17C_form__cbinary_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t* src,
   struct _fx_T4N17C_form__cbinary_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
   _fx_copy_T2N14C_form__ctyp_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void _fx_make_T4N17C_form__cbinary_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_N17C_form__cbinary_t* t0,
   struct _fx_N14C_form__cexp_t_data_t* t1,
   struct _fx_N14C_form__cexp_t_data_t* t2,
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t* t3,
   struct _fx_T4N17C_form__cbinary_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
   _fx_copy_T2N14C_form__ctyp_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_T3N16C_form__cunary_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_T3N16C_form__cunary_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14C_form__cexp_t(&dst->t1);
   _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N16C_form__cunary_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_T3N16C_form__cunary_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t* src,
   struct _fx_T3N16C_form__cunary_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N14C_form__ctyp_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N16C_form__cunary_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_N16C_form__cunary_t* t0,
   struct _fx_N14C_form__cexp_t_data_t* t1,
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t* t2,
   struct _fx_T3N16C_form__cunary_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N14C_form__ctyp_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_T3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14C_form__cexp_t(&dst->t0);
   _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_T3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t* src,
   struct _fx_T3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
   _fx_copy_T2N14C_form__ctyp_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_N14C_form__cexp_t_data_t* t0,
   struct _fx_R9Ast__id_t* t1,
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t* t2,
   struct _fx_T3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
   _fx_copy_T2N14C_form__ctyp_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T3N14C_form__cexp_tN14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_T3N14C_form__cexp_tN14C_form__ctyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14C_form__cexp_t(&dst->t0);
   _fx_free_N14C_form__ctyp_t(&dst->t1);
}

static void _fx_copy_T3N14C_form__cexp_tN14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_T3N14C_form__cexp_tN14C_form__ctyp_tR10Ast__loc_t* src,
   struct _fx_T3N14C_form__cexp_tN14C_form__ctyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3N14C_form__cexp_tN14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_N14C_form__cexp_t_data_t* t0,
   struct _fx_N14C_form__ctyp_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3N14C_form__cexp_tN14C_form__ctyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T4N14C_form__cexp_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_T4N14C_form__cexp_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14C_form__cexp_t(&dst->t0);
   _fx_free_N14C_form__cexp_t(&dst->t1);
   _fx_free_N14C_form__cexp_t(&dst->t2);
   _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&dst->t3);
}

static void _fx_copy_T4N14C_form__cexp_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_T4N14C_form__cexp_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t* src,
   struct _fx_T4N14C_form__cexp_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
   _fx_copy_T2N14C_form__ctyp_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void _fx_make_T4N14C_form__cexp_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_N14C_form__cexp_t_data_t* t0,
   struct _fx_N14C_form__cexp_t_data_t* t1,
   struct _fx_N14C_form__cexp_t_data_t* t2,
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t* t3,
   struct _fx_T4N14C_form__cexp_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
   _fx_copy_T2N14C_form__ctyp_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_LN14C_form__cexp_t(struct _fx_LN14C_form__cexp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LN14C_form__cexp_t, _fx_free_N14C_form__cexp_t);
}

static int _fx_cons_LN14C_form__cexp_t(
   struct _fx_N14C_form__cexp_t_data_t* hd,
   struct _fx_LN14C_form__cexp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN14C_form__cexp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN14C_form__cexp_t, FX_COPY_PTR);
}

static void _fx_free_T3N14C_form__cexp_tLN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_T3N14C_form__cexp_tLN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14C_form__cexp_t(&dst->t0);
   _fx_free_LN14C_form__cexp_t(&dst->t1);
   _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N14C_form__cexp_tLN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_T3N14C_form__cexp_tLN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t* src,
   struct _fx_T3N14C_form__cexp_tLN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N14C_form__ctyp_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N14C_form__cexp_tLN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_N14C_form__cexp_t_data_t* t0,
   struct _fx_LN14C_form__cexp_t_data_t* t1,
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t* t2,
   struct _fx_T3N14C_form__cexp_tLN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N14C_form__ctyp_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T2LN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_T2LN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t* dst)
{
   _fx_free_LN14C_form__cexp_t(&dst->t0);
   _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2LN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_T2LN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t* src,
   struct _fx_T2LN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   _fx_copy_T2N14C_form__ctyp_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2LN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_LN14C_form__cexp_t_data_t* t0,
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t* t1,
   struct _fx_T2LN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   _fx_copy_T2N14C_form__ctyp_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_N14C_form__cexp_t(struct _fx_N14C_form__cexp_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      switch ((*dst)->tag) {
      case 1:
         _fx_free_T2R9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(&(*dst)->u.CExpIdent); break;
      case 2:
         _fx_free_T2N14K_form__klit_tT2N14C_form__ctyp_tR10Ast__loc_t(&(*dst)->u.CExpLit); break;
      case 3:
         _fx_free_T4N17C_form__cbinary_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
            &(*dst)->u.CExpBinary);
         break;
      case 4:
         _fx_free_T3N16C_form__cunary_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(&(*dst)->u.CExpUnary); break;
      case 5:
         _fx_free_T3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(&(*dst)->u.CExpMem); break;
      case 6:
         _fx_free_T3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(&(*dst)->u.CExpArrow); break;
      case 7:
         _fx_free_T3N14C_form__cexp_tN14C_form__ctyp_tR10Ast__loc_t(&(*dst)->u.CExpCast); break;
      case 8:
         _fx_free_T4N14C_form__cexp_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(&(*dst)->u.CExpTernary);
         break;
      case 9:
         _fx_free_T3N14C_form__cexp_tLN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(&(*dst)->u.CExpCall); break;
      case 10:
         _fx_free_T2LN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(&(*dst)->u.CExpInit); break;
      case 11:
         _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&(*dst)->u.CExpTyp); break;
      case 12:
         _fx_free_T2SR10Ast__loc_t(&(*dst)->u.CExpCCode); break;
      default:
         ;
      }
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_T2Nt6option1N14C_form__cexp_tR10Ast__loc_t(struct _fx_T2Nt6option1N14C_form__cexp_tR10Ast__loc_t* dst)
{
   _fx_free_Nt6option1N14C_form__cexp_t(&dst->t0);
}

static void _fx_copy_T2Nt6option1N14C_form__cexp_tR10Ast__loc_t(
   struct _fx_T2Nt6option1N14C_form__cexp_tR10Ast__loc_t* src,
   struct _fx_T2Nt6option1N14C_form__cexp_tR10Ast__loc_t* dst)
{
   _fx_copy_Nt6option1N14C_form__cexp_t(&src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2Nt6option1N14C_form__cexp_tR10Ast__loc_t(
   struct _fx_Nt6option1N14C_form__cexp_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2Nt6option1N14C_form__cexp_tR10Ast__loc_t* fx_result)
{
   _fx_copy_Nt6option1N14C_form__cexp_t(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_T2LN15C_form__cstmt_tR10Ast__loc_t(struct _fx_T2LN15C_form__cstmt_tR10Ast__loc_t* dst)
{
   _fx_free_LN15C_form__cstmt_t(&dst->t0);
}

static void _fx_copy_T2LN15C_form__cstmt_tR10Ast__loc_t(
   struct _fx_T2LN15C_form__cstmt_tR10Ast__loc_t* src,
   struct _fx_T2LN15C_form__cstmt_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2LN15C_form__cstmt_tR10Ast__loc_t(
   struct _fx_LN15C_form__cstmt_t_data_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2LN15C_form__cstmt_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_T2R9Ast__id_tN15C_form__cstmt_t(struct _fx_T2R9Ast__id_tN15C_form__cstmt_t* dst)
{
   _fx_free_N15C_form__cstmt_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tN15C_form__cstmt_t(
   struct _fx_T2R9Ast__id_tN15C_form__cstmt_t* src,
   struct _fx_T2R9Ast__id_tN15C_form__cstmt_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tN15C_form__cstmt_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N15C_form__cstmt_t_data_t* t1,
   struct _fx_T2R9Ast__id_tN15C_form__cstmt_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_T4N14C_form__cexp_tN15C_form__cstmt_tN15C_form__cstmt_tR10Ast__loc_t(
   struct _fx_T4N14C_form__cexp_tN15C_form__cstmt_tN15C_form__cstmt_tR10Ast__loc_t* dst)
{
   _fx_free_N14C_form__cexp_t(&dst->t0);
   _fx_free_N15C_form__cstmt_t(&dst->t1);
   _fx_free_N15C_form__cstmt_t(&dst->t2);
}

static void _fx_copy_T4N14C_form__cexp_tN15C_form__cstmt_tN15C_form__cstmt_tR10Ast__loc_t(
   struct _fx_T4N14C_form__cexp_tN15C_form__cstmt_tN15C_form__cstmt_tR10Ast__loc_t* src,
   struct _fx_T4N14C_form__cexp_tN15C_form__cstmt_tN15C_form__cstmt_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
   dst->t3 = src->t3;
}

static void _fx_make_T4N14C_form__cexp_tN15C_form__cstmt_tN15C_form__cstmt_tR10Ast__loc_t(
   struct _fx_N14C_form__cexp_t_data_t* t0,
   struct _fx_N15C_form__cstmt_t_data_t* t1,
   struct _fx_N15C_form__cstmt_t_data_t* t2,
   struct _fx_R10Ast__loc_t* t3,
   struct _fx_T4N14C_form__cexp_tN15C_form__cstmt_tN15C_form__cstmt_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
   fx_result->t3 = *t3;
}

static void
   _fx_free_T6Nt6option1N14C_form__ctyp_tLN14C_form__cexp_tNt6option1N14C_form__cexp_tLN14C_form__cexp_tN15C_form__cstmt_tR10Ast__loc_t(
   struct _fx_T6Nt6option1N14C_form__ctyp_tLN14C_form__cexp_tNt6option1N14C_form__cexp_tLN14C_form__cexp_tN15C_form__cstmt_tR10Ast__loc_t*
      dst)
{
   _fx_free_Nt6option1N14C_form__ctyp_t(&dst->t0);
   _fx_free_LN14C_form__cexp_t(&dst->t1);
   _fx_free_Nt6option1N14C_form__cexp_t(&dst->t2);
   _fx_free_LN14C_form__cexp_t(&dst->t3);
   _fx_free_N15C_form__cstmt_t(&dst->t4);
}

static void
   _fx_copy_T6Nt6option1N14C_form__ctyp_tLN14C_form__cexp_tNt6option1N14C_form__cexp_tLN14C_form__cexp_tN15C_form__cstmt_tR10Ast__loc_t(
   struct _fx_T6Nt6option1N14C_form__ctyp_tLN14C_form__cexp_tNt6option1N14C_form__cexp_tLN14C_form__cexp_tN15C_form__cstmt_tR10Ast__loc_t*
      src,
   struct _fx_T6Nt6option1N14C_form__ctyp_tLN14C_form__cexp_tNt6option1N14C_form__cexp_tLN14C_form__cexp_tN15C_form__cstmt_tR10Ast__loc_t*
      dst)
{
   _fx_copy_Nt6option1N14C_form__ctyp_t(&src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_Nt6option1N14C_form__cexp_t(&src->t2, &dst->t2);
   FX_COPY_PTR(src->t3, &dst->t3);
   FX_COPY_PTR(src->t4, &dst->t4);
   dst->t5 = src->t5;
}

static void
   _fx_make_T6Nt6option1N14C_form__ctyp_tLN14C_form__cexp_tNt6option1N14C_form__cexp_tLN14C_form__cexp_tN15C_form__cstmt_tR10Ast__loc_t(
   struct _fx_Nt6option1N14C_form__ctyp_t* t0,
   struct _fx_LN14C_form__cexp_t_data_t* t1,
   struct _fx_Nt6option1N14C_form__cexp_t* t2,
   struct _fx_LN14C_form__cexp_t_data_t* t3,
   struct _fx_N15C_form__cstmt_t_data_t* t4,
   struct _fx_R10Ast__loc_t* t5,
   struct _fx_T6Nt6option1N14C_form__ctyp_tLN14C_form__cexp_tNt6option1N14C_form__cexp_tLN14C_form__cexp_tN15C_form__cstmt_tR10Ast__loc_t*
      fx_result)
{
   _fx_copy_Nt6option1N14C_form__ctyp_t(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_Nt6option1N14C_form__cexp_t(t2, &fx_result->t2);
   FX_COPY_PTR(t3, &fx_result->t3);
   FX_COPY_PTR(t4, &fx_result->t4);
   fx_result->t5 = *t5;
}

static void _fx_free_T3N14C_form__cexp_tN15C_form__cstmt_tR10Ast__loc_t(
   struct _fx_T3N14C_form__cexp_tN15C_form__cstmt_tR10Ast__loc_t* dst)
{
   _fx_free_N14C_form__cexp_t(&dst->t0);
   _fx_free_N15C_form__cstmt_t(&dst->t1);
}

static void _fx_copy_T3N14C_form__cexp_tN15C_form__cstmt_tR10Ast__loc_t(
   struct _fx_T3N14C_form__cexp_tN15C_form__cstmt_tR10Ast__loc_t* src,
   struct _fx_T3N14C_form__cexp_tN15C_form__cstmt_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3N14C_form__cexp_tN15C_form__cstmt_tR10Ast__loc_t(
   struct _fx_N14C_form__cexp_t_data_t* t0,
   struct _fx_N15C_form__cstmt_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3N14C_form__cexp_tN15C_form__cstmt_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T3N15C_form__cstmt_tN14C_form__cexp_tR10Ast__loc_t(
   struct _fx_T3N15C_form__cstmt_tN14C_form__cexp_tR10Ast__loc_t* dst)
{
   _fx_free_N15C_form__cstmt_t(&dst->t0);
   _fx_free_N14C_form__cexp_t(&dst->t1);
}

static void _fx_copy_T3N15C_form__cstmt_tN14C_form__cexp_tR10Ast__loc_t(
   struct _fx_T3N15C_form__cstmt_tN14C_form__cexp_tR10Ast__loc_t* src,
   struct _fx_T3N15C_form__cstmt_tN14C_form__cexp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3N15C_form__cstmt_tN14C_form__cexp_tR10Ast__loc_t(
   struct _fx_N15C_form__cstmt_t_data_t* t0,
   struct _fx_N14C_form__cexp_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3N15C_form__cstmt_tN14C_form__cexp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T2LN14C_form__cexp_tLN15C_form__cstmt_t(struct _fx_T2LN14C_form__cexp_tLN15C_form__cstmt_t* dst)
{
   _fx_free_LN14C_form__cexp_t(&dst->t0);
   _fx_free_LN15C_form__cstmt_t(&dst->t1);
}

static void _fx_copy_T2LN14C_form__cexp_tLN15C_form__cstmt_t(
   struct _fx_T2LN14C_form__cexp_tLN15C_form__cstmt_t* src,
   struct _fx_T2LN14C_form__cexp_tLN15C_form__cstmt_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2LN14C_form__cexp_tLN15C_form__cstmt_t(
   struct _fx_LN14C_form__cexp_t_data_t* t0,
   struct _fx_LN15C_form__cstmt_t_data_t* t1,
   struct _fx_T2LN14C_form__cexp_tLN15C_form__cstmt_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2LN14C_form__cexp_tLN15C_form__cstmt_t(struct _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t, _fx_free_T2LN14C_form__cexp_tLN15C_form__cstmt_t);
}

static int _fx_cons_LT2LN14C_form__cexp_tLN15C_form__cstmt_t(
   struct _fx_T2LN14C_form__cexp_tLN15C_form__cstmt_t* hd,
   struct _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t, _fx_copy_T2LN14C_form__cexp_tLN15C_form__cstmt_t);
}

static void _fx_free_T3N14C_form__cexp_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tR10Ast__loc_t(
   struct _fx_T3N14C_form__cexp_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tR10Ast__loc_t* dst)
{
   _fx_free_N14C_form__cexp_t(&dst->t0);
   _fx_free_LT2LN14C_form__cexp_tLN15C_form__cstmt_t(&dst->t1);
}

static void _fx_copy_T3N14C_form__cexp_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tR10Ast__loc_t(
   struct _fx_T3N14C_form__cexp_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tR10Ast__loc_t* src,
   struct _fx_T3N14C_form__cexp_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3N14C_form__cexp_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tR10Ast__loc_t(
   struct _fx_N14C_form__cexp_t_data_t* t0,
   struct _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3N14C_form__cexp_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T4N14C_form__ctyp_tR9Ast__id_tNt6option1N14C_form__cexp_tR10Ast__loc_t(
   struct _fx_T4N14C_form__ctyp_tR9Ast__id_tNt6option1N14C_form__cexp_tR10Ast__loc_t* dst)
{
   _fx_free_N14C_form__ctyp_t(&dst->t0);
   _fx_free_Nt6option1N14C_form__cexp_t(&dst->t2);
}

static void _fx_copy_T4N14C_form__ctyp_tR9Ast__id_tNt6option1N14C_form__cexp_tR10Ast__loc_t(
   struct _fx_T4N14C_form__ctyp_tR9Ast__id_tNt6option1N14C_form__cexp_tR10Ast__loc_t* src,
   struct _fx_T4N14C_form__ctyp_tR9Ast__id_tNt6option1N14C_form__cexp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
   _fx_copy_Nt6option1N14C_form__cexp_t(&src->t2, &dst->t2);
   dst->t3 = src->t3;
}

static void _fx_make_T4N14C_form__ctyp_tR9Ast__id_tNt6option1N14C_form__cexp_tR10Ast__loc_t(
   struct _fx_N14C_form__ctyp_t_data_t* t0,
   struct _fx_R9Ast__id_t* t1,
   struct _fx_Nt6option1N14C_form__cexp_t* t2,
   struct _fx_R10Ast__loc_t* t3,
   struct _fx_T4N14C_form__ctyp_tR9Ast__id_tNt6option1N14C_form__cexp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
   _fx_copy_Nt6option1N14C_form__cexp_t(t2, &fx_result->t2);
   fx_result->t3 = *t3;
}

static void _fx_free_T2N14C_form__cexp_tLN15C_form__cstmt_t(struct _fx_T2N14C_form__cexp_tLN15C_form__cstmt_t* dst)
{
   _fx_free_N14C_form__cexp_t(&dst->t0);
   _fx_free_LN15C_form__cstmt_t(&dst->t1);
}

static void _fx_copy_T2N14C_form__cexp_tLN15C_form__cstmt_t(
   struct _fx_T2N14C_form__cexp_tLN15C_form__cstmt_t* src,
   struct _fx_T2N14C_form__cexp_tLN15C_form__cstmt_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2N14C_form__cexp_tLN15C_form__cstmt_t(
   struct _fx_N14C_form__cexp_t_data_t* t0,
   struct _fx_LN15C_form__cstmt_t_data_t* t1,
   struct _fx_T2N14C_form__cexp_tLN15C_form__cstmt_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2N14C_form__cexp_tLN15C_form__cstmt_t(struct _fx_LT2N14C_form__cexp_tLN15C_form__cstmt_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2N14C_form__cexp_tLN15C_form__cstmt_t, _fx_free_T2N14C_form__cexp_tLN15C_form__cstmt_t);
}

static int _fx_cons_LT2N14C_form__cexp_tLN15C_form__cstmt_t(
   struct _fx_T2N14C_form__cexp_tLN15C_form__cstmt_t* hd,
   struct _fx_LT2N14C_form__cexp_tLN15C_form__cstmt_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2N14C_form__cexp_tLN15C_form__cstmt_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2N14C_form__cexp_tLN15C_form__cstmt_t, _fx_copy_T2N14C_form__cexp_tLN15C_form__cstmt_t);
}

static void _fx_free_T3LT2N14C_form__cexp_tLN15C_form__cstmt_tLN15C_form__cstmt_tR10Ast__loc_t(
   struct _fx_T3LT2N14C_form__cexp_tLN15C_form__cstmt_tLN15C_form__cstmt_tR10Ast__loc_t* dst)
{
   _fx_free_LT2N14C_form__cexp_tLN15C_form__cstmt_t(&dst->t0);
   _fx_free_LN15C_form__cstmt_t(&dst->t1);
}

static void _fx_copy_T3LT2N14C_form__cexp_tLN15C_form__cstmt_tLN15C_form__cstmt_tR10Ast__loc_t(
   struct _fx_T3LT2N14C_form__cexp_tLN15C_form__cstmt_tLN15C_form__cstmt_tR10Ast__loc_t* src,
   struct _fx_T3LT2N14C_form__cexp_tLN15C_form__cstmt_tLN15C_form__cstmt_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3LT2N14C_form__cexp_tLN15C_form__cstmt_tLN15C_form__cstmt_tR10Ast__loc_t(
   struct _fx_LT2N14C_form__cexp_tLN15C_form__cstmt_t_data_t* t0,
   struct _fx_LN15C_form__cstmt_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3LT2N14C_form__cexp_tLN15C_form__cstmt_tLN15C_form__cstmt_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_N15C_form__cstmt_t(struct _fx_N15C_form__cstmt_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      switch ((*dst)->tag) {
      case 2:
         _fx_free_T2SR10Ast__loc_t(&(*dst)->u.CComment); break;
      case 3:
         _fx_free_N14C_form__cexp_t(&(*dst)->u.CExp); break;
      case 6:
         _fx_free_T2Nt6option1N14C_form__cexp_tR10Ast__loc_t(&(*dst)->u.CStmtReturn); break;
      case 7:
         _fx_free_T2LN15C_form__cstmt_tR10Ast__loc_t(&(*dst)->u.CStmtBlock); break;
      case 8:
         _fx_free_T2R9Ast__id_tN15C_form__cstmt_t(&(*dst)->u.CStmtSync); break;
      case 9:
         _fx_free_T4N14C_form__cexp_tN15C_form__cstmt_tN15C_form__cstmt_tR10Ast__loc_t(&(*dst)->u.CStmtIf); break;
      case 12:
         _fx_free_T6Nt6option1N14C_form__ctyp_tLN14C_form__cexp_tNt6option1N14C_form__cexp_tLN14C_form__cexp_tN15C_form__cstmt_tR10Ast__loc_t(
            &(*dst)->u.CStmtFor);
         break;
      case 13:
         _fx_free_T3N14C_form__cexp_tN15C_form__cstmt_tR10Ast__loc_t(&(*dst)->u.CStmtWhile); break;
      case 14:
         _fx_free_T3N15C_form__cstmt_tN14C_form__cexp_tR10Ast__loc_t(&(*dst)->u.CStmtDoWhile); break;
      case 15:
         _fx_free_T3N14C_form__cexp_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tR10Ast__loc_t(&(*dst)->u.CStmtSwitch); break;
      case 16:
         _fx_free_T4N14C_form__ctyp_tR9Ast__id_tNt6option1N14C_form__cexp_tR10Ast__loc_t(&(*dst)->u.CDefVal); break;
      case 17:
         _fx_free_rR17C_form__cdeffun_t(&(*dst)->u.CDefFun); break;
      case 18:
         _fx_free_rR17C_form__cdeftyp_t(&(*dst)->u.CDefTyp); break;
      case 21:
         _fx_free_rR18C_form__cdefenum_t(&(*dst)->u.CDefEnum); break;
      case 22:
         _fx_free_rR23C_form__cdefinterface_t(&(*dst)->u.CDefInterface); break;
      case 23:
         _fx_free_rR19C_form__cdefmacro_t(&(*dst)->u.CMacroDef); break;
      case 25:
         _fx_free_T3LT2N14C_form__cexp_tLN15C_form__cstmt_tLN15C_form__cstmt_tR10Ast__loc_t(&(*dst)->u.CMacroIf); break;
      case 26:
         _fx_free_T2SR10Ast__loc_t(&(*dst)->u.CMacroInclude); break;
      case 27:
         _fx_free_T2SR10Ast__loc_t(&(*dst)->u.CMacroPragma); break;
      default:
         ;
      }
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_R29C_gen_types__ctyp_temp_info_t(struct _fx_R29C_gen_types__ctyp_temp_info_t* dst)
{
   _fx_free_rR17C_form__cdeftyp_t(&dst->ctti_struct_decl);
   _fx_free_rR17C_form__cdeffun_t(&dst->ctti_freef_decl);
   _fx_free_rR17C_form__cdeffun_t(&dst->ctti_copyf_decl);
   _fx_free_N14C_form__cexp_t(&dst->ctti_src_exp);
   _fx_free_N14C_form__cexp_t(&dst->ctti_dst_exp);
   fx_free_str(&dst->ctti_cname_wo_prefix);
}

static void _fx_copy_R29C_gen_types__ctyp_temp_info_t(
   struct _fx_R29C_gen_types__ctyp_temp_info_t* src,
   struct _fx_R29C_gen_types__ctyp_temp_info_t* dst)
{
   FX_COPY_PTR(src->ctti_struct_decl, &dst->ctti_struct_decl);
   FX_COPY_PTR(src->ctti_freef_decl, &dst->ctti_freef_decl);
   FX_COPY_PTR(src->ctti_copyf_decl, &dst->ctti_copyf_decl);
   FX_COPY_PTR(src->ctti_src_exp, &dst->ctti_src_exp);
   FX_COPY_PTR(src->ctti_dst_exp, &dst->ctti_dst_exp);
   fx_copy_str(&src->ctti_cname_wo_prefix, &dst->ctti_cname_wo_prefix);
}

static void _fx_make_R29C_gen_types__ctyp_temp_info_t(
   struct _fx_rR17C_form__cdeftyp_t_data_t* r_ctti_struct_decl,
   struct _fx_rR17C_form__cdeffun_t_data_t* r_ctti_freef_decl,
   struct _fx_rR17C_form__cdeffun_t_data_t* r_ctti_copyf_decl,
   struct _fx_N14C_form__cexp_t_data_t* r_ctti_src_exp,
   struct _fx_N14C_form__cexp_t_data_t* r_ctti_dst_exp,
   fx_str_t* r_ctti_cname_wo_prefix,
   struct _fx_R29C_gen_types__ctyp_temp_info_t* fx_result)
{
   FX_COPY_PTR(r_ctti_struct_decl, &fx_result->ctti_struct_decl);
   FX_COPY_PTR(r_ctti_freef_decl, &fx_result->ctti_freef_decl);
   FX_COPY_PTR(r_ctti_copyf_decl, &fx_result->ctti_copyf_decl);
   FX_COPY_PTR(r_ctti_src_exp, &fx_result->ctti_src_exp);
   FX_COPY_PTR(r_ctti_dst_exp, &fx_result->ctti_dst_exp);
   fx_copy_str(r_ctti_cname_wo_prefix, &fx_result->ctti_cname_wo_prefix);
}

static void _fx_free_Nt6option1R29C_gen_types__ctyp_temp_info_t(struct _fx_Nt6option1R29C_gen_types__ctyp_temp_info_t* dst)
{
   switch (dst->tag) {
   case 2:
      _fx_free_R29C_gen_types__ctyp_temp_info_t(&dst->u.Some); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_Nt6option1R29C_gen_types__ctyp_temp_info_t(
   struct _fx_Nt6option1R29C_gen_types__ctyp_temp_info_t* src,
   struct _fx_Nt6option1R29C_gen_types__ctyp_temp_info_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 2:
      _fx_copy_R29C_gen_types__ctyp_temp_info_t(&src->u.Some, &dst->u.Some); break;
   default:
      dst->u = src->u;
   }
}

static void
   _fx_free_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t*
      dst)
{
   _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&dst->t1);
   _fx_free_R29C_gen_types__ctyp_temp_info_t(&dst->t3);
   _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&dst->t4);
}

static void
   _fx_copy_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t*
      src,
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t*
      dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
   _fx_copy_R29C_gen_types__ctyp_temp_info_t(&src->t3, &dst->t3);
   FX_COPY_PTR(src->t4, &dst->t4);
}

static void
   _fx_make_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(
   struct _fx_N12Map__color_t* t0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t* t1,
   struct _fx_R9Ast__id_t* t2,
   struct _fx_R29C_gen_types__ctyp_temp_info_t* t3,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t* t4,
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t*
      fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
   _fx_copy_R29C_gen_types__ctyp_temp_info_t(t3, &fx_result->t3);
   FX_COPY_PTR(t4, &fx_result->t4);
}

static void _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(
         &(*dst)->u.Node);
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(
   struct _fx_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t* dst)
{
   _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&dst->root);
   fx_free_fp(&dst->cmp);
}

static void _fx_copy_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(
   struct _fx_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t* src,
   struct _fx_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t* dst)
{
   FX_COPY_PTR(src->root, &dst->root);
   FX_COPY_FP(&src->cmp, &dst->cmp);
}

static void _fx_make_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t* r_root,
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t* r_cmp,
   struct _fx_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t* fx_result)
{
   FX_COPY_PTR(r_root, &fx_result->root);
   FX_COPY_FP(r_cmp, &fx_result->cmp);
}

static void _fx_free_T2Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tB(
   struct _fx_T2Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tB* dst)
{
   _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&dst->t0);
}

static void _fx_copy_T2Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tB(
   struct _fx_T2Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tB* src,
   struct _fx_T2Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tB* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tB(
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t* t0,
   bool t1,
   struct _fx_T2Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tB* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = t1;
}

static void _fx_free_T2Nt11Set__tree_t1R9Ast__id_ti(struct _fx_T2Nt11Set__tree_t1R9Ast__id_ti* dst)
{
   _fx_free_Nt11Set__tree_t1R9Ast__id_t(&dst->t0);
}

static void _fx_copy_T2Nt11Set__tree_t1R9Ast__id_ti(
   struct _fx_T2Nt11Set__tree_t1R9Ast__id_ti* src,
   struct _fx_T2Nt11Set__tree_t1R9Ast__id_ti* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2Nt11Set__tree_t1R9Ast__id_ti(
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* t0,
   int_ t1,
   struct _fx_T2Nt11Set__tree_t1R9Ast__id_ti* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = t1;
}

static void _fx_free_T2Nt11Set__tree_t1R9Ast__id_tB(struct _fx_T2Nt11Set__tree_t1R9Ast__id_tB* dst)
{
   _fx_free_Nt11Set__tree_t1R9Ast__id_t(&dst->t0);
}

static void _fx_copy_T2Nt11Set__tree_t1R9Ast__id_tB(
   struct _fx_T2Nt11Set__tree_t1R9Ast__id_tB* src,
   struct _fx_T2Nt11Set__tree_t1R9Ast__id_tB* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2Nt11Set__tree_t1R9Ast__id_tB(
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* t0,
   bool t1,
   struct _fx_T2Nt11Set__tree_t1R9Ast__id_tB* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = t1;
}

static void _fx_free_T2BNt6option1N14C_form__cexp_t(struct _fx_T2BNt6option1N14C_form__cexp_t* dst)
{
   _fx_free_Nt6option1N14C_form__cexp_t(&dst->t1);
}

static void _fx_copy_T2BNt6option1N14C_form__cexp_t(
   struct _fx_T2BNt6option1N14C_form__cexp_t* src,
   struct _fx_T2BNt6option1N14C_form__cexp_t* dst)
{
   dst->t0 = src->t0;
   _fx_copy_Nt6option1N14C_form__cexp_t(&src->t1, &dst->t1);
}

static void _fx_make_T2BNt6option1N14C_form__cexp_t(
   bool t0,
   struct _fx_Nt6option1N14C_form__cexp_t* t1,
   struct _fx_T2BNt6option1N14C_form__cexp_t* fx_result)
{
   fx_result->t0 = t0;
   _fx_copy_Nt6option1N14C_form__cexp_t(t1, &fx_result->t1);
}

static void _fx_free_Ta3LN15C_form__cstmt_t(struct _fx_Ta3LN15C_form__cstmt_t* dst)
{
   _fx_free_LN15C_form__cstmt_t(&dst->t0);
   _fx_free_LN15C_form__cstmt_t(&dst->t1);
   _fx_free_LN15C_form__cstmt_t(&dst->t2);
}

static void _fx_copy_Ta3LN15C_form__cstmt_t(struct _fx_Ta3LN15C_form__cstmt_t* src, struct _fx_Ta3LN15C_form__cstmt_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
}

static void _fx_make_Ta3LN15C_form__cstmt_t(
   struct _fx_LN15C_form__cstmt_t_data_t* t0,
   struct _fx_LN15C_form__cstmt_t_data_t* t1,
   struct _fx_LN15C_form__cstmt_t_data_t* t2,
   struct _fx_Ta3LN15C_form__cstmt_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
}

static void _fx_free_rLN15C_form__cstmt_t(struct _fx_rLN15C_form__cstmt_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rLN15C_form__cstmt_t, _fx_free_LN15C_form__cstmt_t);
}

static int _fx_make_rLN15C_form__cstmt_t(
   struct _fx_LN15C_form__cstmt_t_data_t* arg,
   struct _fx_rLN15C_form__cstmt_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rLN15C_form__cstmt_t, FX_COPY_PTR);
}

static void _fx_free_rRt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(
   struct _fx_rRt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rRt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t,
      _fx_free_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t);
}

static int _fx_make_rRt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(
   struct _fx_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t* arg,
   struct _fx_rRt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rRt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t,
      _fx_copy_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t);
}

static void _fx_free_T2N14C_form__ctyp_tLN19C_form__carg_attr_t(struct _fx_T2N14C_form__ctyp_tLN19C_form__carg_attr_t* dst)
{
   _fx_free_N14C_form__ctyp_t(&dst->t0);
   fx_free_list_simple(&dst->t1);
}

static void _fx_copy_T2N14C_form__ctyp_tLN19C_form__carg_attr_t(
   struct _fx_T2N14C_form__ctyp_tLN19C_form__carg_attr_t* src,
   struct _fx_T2N14C_form__ctyp_tLN19C_form__carg_attr_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2N14C_form__ctyp_tLN19C_form__carg_attr_t(
   struct _fx_N14C_form__ctyp_t_data_t* t0,
   struct _fx_LN19C_form__carg_attr_t_data_t* t1,
   struct _fx_T2N14C_form__ctyp_tLN19C_form__carg_attr_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_T3BBRt6Set__t1R9Ast__id_t(struct _fx_T3BBRt6Set__t1R9Ast__id_t* dst)
{
   _fx_free_Rt6Set__t1R9Ast__id_t(&dst->t2);
}

static void _fx_copy_T3BBRt6Set__t1R9Ast__id_t(
   struct _fx_T3BBRt6Set__t1R9Ast__id_t* src,
   struct _fx_T3BBRt6Set__t1R9Ast__id_t* dst)
{
   dst->t0 = src->t0;
   dst->t1 = src->t1;
   _fx_copy_Rt6Set__t1R9Ast__id_t(&src->t2, &dst->t2);
}

static void _fx_make_T3BBRt6Set__t1R9Ast__id_t(
   bool t0,
   bool t1,
   struct _fx_Rt6Set__t1R9Ast__id_t* t2,
   struct _fx_T3BBRt6Set__t1R9Ast__id_t* fx_result)
{
   fx_result->t0 = t0;
   fx_result->t1 = t1;
   _fx_copy_Rt6Set__t1R9Ast__id_t(t2, &fx_result->t2);
}

static void _fx_free_T2N14C_form__ctyp_tNt6option1R9Ast__id_t(struct _fx_T2N14C_form__ctyp_tNt6option1R9Ast__id_t* dst)
{
   _fx_free_N14C_form__ctyp_t(&dst->t0);
}

static void _fx_copy_T2N14C_form__ctyp_tNt6option1R9Ast__id_t(
   struct _fx_T2N14C_form__ctyp_tNt6option1R9Ast__id_t* src,
   struct _fx_T2N14C_form__ctyp_tNt6option1R9Ast__id_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2N14C_form__ctyp_tNt6option1R9Ast__id_t(
   struct _fx_N14C_form__ctyp_t_data_t* t0,
   struct _fx_Nt6option1R9Ast__id_t* t1,
   struct _fx_T2N14C_form__ctyp_tNt6option1R9Ast__id_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void
   _fx_free_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
   struct _fx_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t*
      dst)
{
   _fx_free_LN15C_form__cstmt_t(&dst->t0);
   _fx_free_LN15C_form__cstmt_t(&dst->t1);
   _fx_free_LN15C_form__cstmt_t(&dst->t2);
   _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&dst->t3);
   _fx_free_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&dst->t4);
}

static void
   _fx_copy_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
   struct _fx_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t*
      src,
   struct _fx_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t*
      dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
   FX_COPY_PTR(src->t3, &dst->t3);
   FX_COPY_PTR(src->t4, &dst->t4);
}

static void
   _fx_make_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
   struct _fx_LN15C_form__cstmt_t_data_t* t0,
   struct _fx_LN15C_form__cstmt_t_data_t* t1,
   struct _fx_LN15C_form__cstmt_t_data_t* t2,
   struct _fx_LT2R9Ast__id_tN14C_form__ctyp_t_data_t* t3,
   struct _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t_data_t* t4,
   struct _fx_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t*
      fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
   FX_COPY_PTR(t3, &fx_result->t3);
   FX_COPY_PTR(t4, &fx_result->t4);
}

static void _fx_free_T3N14C_form__ctyp_tLN19C_form__carg_attr_tN14C_form__cexp_t(
   struct _fx_T3N14C_form__ctyp_tLN19C_form__carg_attr_tN14C_form__cexp_t* dst)
{
   _fx_free_N14C_form__ctyp_t(&dst->t0);
   fx_free_list_simple(&dst->t1);
   _fx_free_N14C_form__cexp_t(&dst->t2);
}

static void _fx_copy_T3N14C_form__ctyp_tLN19C_form__carg_attr_tN14C_form__cexp_t(
   struct _fx_T3N14C_form__ctyp_tLN19C_form__carg_attr_tN14C_form__cexp_t* src,
   struct _fx_T3N14C_form__ctyp_tLN19C_form__carg_attr_tN14C_form__cexp_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
}

static void _fx_make_T3N14C_form__ctyp_tLN19C_form__carg_attr_tN14C_form__cexp_t(
   struct _fx_N14C_form__ctyp_t_data_t* t0,
   struct _fx_LN19C_form__carg_attr_t_data_t* t1,
   struct _fx_N14C_form__cexp_t_data_t* t2,
   struct _fx_T3N14C_form__ctyp_tLN19C_form__carg_attr_tN14C_form__cexp_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
}

static void _fx_free_T2BN14C_form__cexp_t(struct _fx_T2BN14C_form__cexp_t* dst)
{
   _fx_free_N14C_form__cexp_t(&dst->t1);
}

static void _fx_copy_T2BN14C_form__cexp_t(struct _fx_T2BN14C_form__cexp_t* src, struct _fx_T2BN14C_form__cexp_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2BN14C_form__cexp_t(
   bool t0,
   struct _fx_N14C_form__cexp_t_data_t* t1,
   struct _fx_T2BN14C_form__cexp_t* fx_result)
{
   fx_result->t0 = t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void
   _fx_free_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t(
   struct _fx_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t*
      dst)
{
   _fx_free_LT2LN14C_form__cexp_tLN15C_form__cstmt_t(&dst->t0);
   _fx_free_LT2LN14C_form__cexp_tLN15C_form__cstmt_t(&dst->t1);
   _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&dst->t2);
}

static void
   _fx_copy_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t(
   struct _fx_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t*
      src,
   struct _fx_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t*
      dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
}

static void
   _fx_make_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t(
   struct _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t_data_t* t0,
   struct _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t_data_t* t1,
   struct _fx_LT2R9Ast__id_tN14C_form__ctyp_t_data_t* t2,
   struct _fx_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t*
      fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
}

static void _fx_free_T2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_T2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t* dst)
{
   _fx_free_N15C_form__cstmt_t(&dst->t0);
   _fx_free_Nt10Hashset__t1R9Ast__id_t(&dst->t1);
}

static void _fx_copy_T2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_T2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t* src,
   struct _fx_T2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_N15C_form__cstmt_t_data_t* t0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* t1,
   struct _fx_T2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_LT2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t,
      _fx_free_T2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t);
}

static int _fx_cons_LT2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_T2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t* hd,
   struct _fx_LT2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t,
      _fx_copy_T2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t);
}

_fx_Nt6option1R29C_gen_types__ctyp_temp_info_t _fx_g17C_gen_types__None = { 1 };
_fx_Nt6option1FPv2N14C_form__cexp_tR22C_form__c_fold_callb_t _fx_g19C_gen_types__None1_ = 0;
_fx_Nt6option1FPv2R9Ast__id_tR22C_form__c_fold_callb_t _fx_g19C_gen_types__None2_ = 0;
_fx_Nt6option1N14C_form__cexp_t _fx_g19C_gen_types__None3_ = { 1 };
_fx_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t _fx_g19C_gen_types__None4_ = 0;
_fx_Nt6option1R9Ast__id_t _fx_g19C_gen_types__None5_ = { 1 };
_fx_N12Map__color_t _fx_g16C_gen_types__Red = { 1 };
_fx_N12Map__color_t _fx_g18C_gen_types__Black = { 2 };
_fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t _fx_g18C_gen_types__Empty = 0;
_fx_N12Set__color_t _fx_g18C_gen_types__Red1_ = { 1 };
_fx_N12Set__color_t _fx_g20C_gen_types__Black1_ = { 2 };
_fx_Nt11Set__tree_t1R9Ast__id_t _fx_g20C_gen_types__Empty1_ = 0;
_fx_N12Ast__cmpop_t _fx_g18C_gen_types__CmpEQ = { 1 };
_fx_N17C_form__cbinary_t _fx_g24C_gen_types__COpLogicAnd = { 11 };
_fx_N17C_form__cbinary_t _fx_g22C_gen_types__COpAssign = { 15 };
_fx_N16C_form__cunary_t _fx_g21C_gen_types__COpDeref = { 5 };
_fx_N19C_form__ctyp_attr_t _fx_g22C_gen_types__CTypConst = { 1 };
_fx_N19C_form__carg_attr_t _fx_g26C_gen_types__CArgPassByPtr = { 1 };
_fx_N19C_form__carg_attr_t _fx_g23C_gen_types__CArgRetVal = { 2 };
static _fx_N14C_form__ctyp_t_data_t CTypInt_data_2 = { 1, 1 };
_fx_N14C_form__ctyp_t _fx_g20C_gen_types__CTypInt = &CTypInt_data_2;
static _fx_N14C_form__ctyp_t_data_t CTypCInt_data_2 = { 1, 2 };
_fx_N14C_form__ctyp_t _fx_g21C_gen_types__CTypCInt = &CTypCInt_data_2;
static _fx_N14C_form__ctyp_t_data_t CTypLong_data_1 = { 1, 6 };
_fx_N14C_form__ctyp_t _fx_g21C_gen_types__CTypLong = &CTypLong_data_1;
static _fx_N14C_form__ctyp_t_data_t CTypVoid_data_2 = { 1, 8 };
_fx_N14C_form__ctyp_t _fx_g21C_gen_types__CTypVoid = &CTypVoid_data_2;
static _fx_N14C_form__ctyp_t_data_t CTypBool_data_2 = { 1, 9 };
_fx_N14C_form__ctyp_t _fx_g21C_gen_types__CTypBool = &CTypBool_data_2;
static _fx_N14C_form__ctyp_t_data_t CTypUniChar_data_1 = { 1, 10 };
_fx_N14C_form__ctyp_t _fx_g24C_gen_types__CTypUniChar = &CTypUniChar_data_1;
static _fx_N14C_form__ctyp_t_data_t CTypCSmartPtr_data_1 = { 1, 11 };
_fx_N14C_form__ctyp_t _fx_g26C_gen_types__CTypCSmartPtr = &CTypCSmartPtr_data_1;
static _fx_N14C_form__ctyp_t_data_t CTypString_data_2 = { 1, 12 };
_fx_N14C_form__ctyp_t _fx_g23C_gen_types__CTypString = &CTypString_data_2;
static _fx_N14C_form__ctyp_t_data_t CTypExn_data_2 = { 1, 13 };
_fx_N14C_form__ctyp_t _fx_g20C_gen_types__CTypExn = &CTypExn_data_2;
static _fx_N14C_form__ctyp_t_data_t CTypAny_data_2 = { 1, 23 };
_fx_N14C_form__ctyp_t _fx_g20C_gen_types__CTypAny = &CTypAny_data_2;
FX_EXTERN_C int _fx_F9make_FailE1S(fx_str_t* arg0, fx_exn_t* fx_result);

FX_EXTERN_C int _fx_M7HashsetFM9makeindexA1i1i(int_ size_0, fx_arr_t* fx_result, void* fx_fv);

FX_EXTERN_C bool _fx_F6__eq__B2SS(fx_str_t* a, fx_str_t* b, void* fx_fv);

FX_EXTERN_C int _fx_F6assertv1B(bool f_0, void* fx_fv);

FX_EXTERN_C int _fx_M11C_gen_typesFM9ktyp2ctypN14C_form__ctyp_t2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__ktyp_t_data_t* t_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_N14C_form__ctyp_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M10K_annotateFM11get_ktpropsR17K_form__ktprops_t2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__ktyp_t_data_t* t_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_R17K_form__ktprops_t* fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M6K_formFM10deref_ktypN14K_form__ktyp_t2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__ktyp_t_data_t* kt_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_N14K_form__ktyp_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M6C_formFM10CTypRawPtrN14C_form__ctyp_t2LN19C_form__ctyp_attr_tN14C_form__ctyp_t(
   struct _fx_LN19C_form__ctyp_attr_t_data_t* arg0,
   struct _fx_N14C_form__ctyp_t_data_t* arg1,
   struct _fx_N14C_form__ctyp_t_data_t** fx_result);

FX_EXTERN_C_VAL(struct _fx_N14C_form__ctyp_t_data_t* _fx_g23C_form__std_CTypVoidPtr)
static int _fx_M11C_gen_typesFM10ktyp2ctyp_N14C_form__ctyp_t2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__ktyp_t_data_t* t_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_N14C_form__ctyp_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M6C_formFM8CTypSIntN14C_form__ctyp_t1i(int_ arg0, struct _fx_N14C_form__ctyp_t_data_t** fx_result);

FX_EXTERN_C int _fx_M6C_formFM8CTypUIntN14C_form__ctyp_t1i(int_ arg0, struct _fx_N14C_form__ctyp_t_data_t** fx_result);

FX_EXTERN_C int _fx_M6C_formFM9CTypFloatN14C_form__ctyp_t1i(int_ arg0, struct _fx_N14C_form__ctyp_t_data_t** fx_result);

FX_EXTERN_C int _fx_M6C_formFM13CTypFunRawPtrN14C_form__ctyp_t2LN14C_form__ctyp_tN14C_form__ctyp_t(
   struct _fx_LN14C_form__ctyp_t_data_t* arg0,
   struct _fx_N14C_form__ctyp_t_data_t* arg1,
   struct _fx_N14C_form__ctyp_t_data_t** fx_result);

FX_EXTERN_C int _fx_M3AstFM11compile_errE2RM5loc_tS(
   struct _fx_R10Ast__loc_t* loc_0,
   fx_str_t* msg_0,
   fx_exn_t* fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M6C_formFM8CTypNameN14C_form__ctyp_t1R9Ast__id_t(
   struct _fx_R9Ast__id_t* arg0,
   struct _fx_N14C_form__ctyp_t_data_t** fx_result);

FX_EXTERN_C int _fx_M6C_formFM9CTypArrayN14C_form__ctyp_t2iN14C_form__ctyp_t(
   int_ arg0,
   struct _fx_N14C_form__ctyp_t_data_t* arg1,
   struct _fx_N14C_form__ctyp_t_data_t** fx_result);

FX_EXTERN_C int _fx_M6C_formFM10CTypVectorN14C_form__ctyp_t1N14C_form__ctyp_t(
   struct _fx_N14C_form__ctyp_t_data_t* arg0,
   struct _fx_N14C_form__ctyp_t_data_t** fx_result);

FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g9Ast__noid)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g24C_form__std_fx_free_cptr)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g24C_form__std_fx_copy_cptr)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g24C_form__std_FX_FREE_LONG)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g24C_form__std_fx_free_long)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g24C_form__std_fx_copy_long)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g23C_form__std_FX_FREE_STR)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g23C_form__std_fx_free_str)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g23C_form__std_fx_copy_str)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g23C_form__std_fx_free_exn)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g23C_form__std_fx_copy_exn)
FX_EXTERN_C int _fx_M6K_formFM7idk2strS2R9Ast__id_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* n_0,
   struct _fx_R10Ast__loc_t* loc_0,
   fx_str_t* fx_result,
   void* fx_fv);

FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g23C_form__std_FX_FREE_ARR)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g23C_form__std_fx_free_arr)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g23C_form__std_fx_copy_arr)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g23C_form__std_fx_free_vec)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g23C_form__std_fx_copy_vec)
FX_EXTERN_C int _fx_M6C_formFM6cinfo_N15C_form__cinfo_t2R9Ast__id_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* i_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_N15C_form__cinfo_t* fx_result,
   void* fx_fv);

FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g25C_form__std_FX_FREE_IFACE)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g25C_form__std_fx_free_iface)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g25C_form__std_FX_COPY_IFACE)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g25C_form__std_fx_copy_iface)
FX_EXTERN_C int _fx_M3AstFM6__eq__B2RM4id_tRM4id_t(
   struct _fx_R9Ast__id_t* a_0,
   struct _fx_R9Ast__id_t* b_0,
   bool* fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M6C_formFM9ctyp2str_S2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_N14C_form__ctyp_t_data_t* t_0,
   struct _fx_R10Ast__loc_t* loc_0,
   fx_str_t* fx_result,
   void* fx_fv);

FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g18C_form__std_FX_NOP)
FX_EXTERN_C int _fx_M6C_formFM11make_id_expN14C_form__cexp_t2R9Ast__id_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* i_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_N14C_form__cexp_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g33C_form__std_FX_COPY_SIMPLE_BY_PTR)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g26C_form__std_FX_COPY_SIMPLE)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g23C_form__std_FX_COPY_PTR)
FX_EXTERN_C int
   _fx_M6C_formFM10CExpBinaryN14C_form__cexp_t4N17C_form__cbinary_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_N17C_form__cbinary_t* arg0,
   struct _fx_N14C_form__cexp_t_data_t* arg1,
   struct _fx_N14C_form__cexp_t_data_t* arg2,
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t* arg3,
   struct _fx_N14C_form__cexp_t_data_t** fx_result);

FX_EXTERN_C int _fx_M6C_formFM13cexp_get_addrN14C_form__cexp_t1N14C_form__cexp_t(
   struct _fx_N14C_form__cexp_t_data_t* e_0,
   struct _fx_N14C_form__cexp_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M6C_formFM8CExpCallN14C_form__cexp_t3N14C_form__cexp_tLN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_N14C_form__cexp_t_data_t* arg0,
   struct _fx_LN14C_form__cexp_t_data_t* arg1,
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t* arg2,
   struct _fx_N14C_form__cexp_t_data_t** fx_result);

FX_EXTERN_C int _fx_M6C_formFM4CExpN15C_form__cstmt_t1N14C_form__cexp_t(
   struct _fx_N14C_form__cexp_t_data_t* arg0,
   struct _fx_N15C_form__cstmt_t_data_t** fx_result);

FX_EXTERN_C int _fx_M6C_formFM8CStmtNopN15C_form__cstmt_t1R10Ast__loc_t(
   struct _fx_R10Ast__loc_t* arg0,
   struct _fx_N15C_form__cstmt_t_data_t** fx_result);

FX_EXTERN_C int _fx_M6C_formFM7CStmtIfN15C_form__cstmt_t4N14C_form__cexp_tN15C_form__cstmt_tN15C_form__cstmt_tR10Ast__loc_t(
   struct _fx_N14C_form__cexp_t_data_t* arg0,
   struct _fx_N15C_form__cstmt_t_data_t* arg1,
   struct _fx_N15C_form__cstmt_t_data_t* arg2,
   struct _fx_R10Ast__loc_t* arg3,
   struct _fx_N15C_form__cstmt_t_data_t** fx_result);

FX_EXTERN_C int _fx_M3AstFM6get_idRM4id_t1S(fx_str_t* s_0, struct _fx_R9Ast__id_t* fx_result, void* fx_fv);

FX_EXTERN_C int _fx_M6C_formFM9CExpArrowN14C_form__cexp_t3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_N14C_form__cexp_t_data_t* arg0,
   struct _fx_R9Ast__id_t* arg1,
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t* arg2,
   struct _fx_N14C_form__cexp_t_data_t** fx_result);

FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g21C_form__std_FX_DECREF)
FX_EXTERN_C int _fx_M6C_formFM9make_callN14C_form__cexp_t4R9Ast__id_tLN14C_form__cexp_tN14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* f_0,
   struct _fx_LN14C_form__cexp_t_data_t* args_0,
   struct _fx_N14C_form__ctyp_t_data_t* rt_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_N14C_form__cexp_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C void _fx_M6C_formFM6COpCmpN17C_form__cbinary_t1N12Ast__cmpop_t(
   struct _fx_N12Ast__cmpop_t* arg0,
   struct _fx_N17C_form__cbinary_t* fx_result);

FX_EXTERN_C int _fx_M6C_formFM12make_int_expN14C_form__cexp_t2iR10Ast__loc_t(
   int_ i_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_N14C_form__cexp_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g19C_form__std_fx_free)
FX_EXTERN_C int _fx_M6C_formFM11rccode2stmtN15C_form__cstmt_t2LN15C_form__cstmt_tR10Ast__loc_t(
   struct _fx_LN15C_form__cstmt_t_data_t* code_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_N15C_form__cstmt_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M6C_formFM12make_nullptrN14C_form__cexp_t1R10Ast__loc_t(
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_N14C_form__cexp_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C_VAL(struct _fx_Rt6Set__t1R9Ast__id_t _fx_g16Ast__empty_idset)
FX_EXTERN_C int _fx_M3AstFM6cmp_idi2RM4id_tRM4id_t(
   struct _fx_R9Ast__id_t* a_0,
   struct _fx_R9Ast__id_t* b_0,
   int_* fx_result,
   void* fx_fv);

FX_EXTERN_C int
   _fx_M11C_gen_typesFM7make_fpFPv2N14K_form__kexp_tR22K_form__k_fold_callb_t8rRt6Set__t1R9Ast__id_trRt6Set__t1R9Ast__id_trRt6Map__t2R9Ast__id_tRM16ctyp_temp_info_trRt6Set__t1R9Ast__id_trirLN15C_form__cstmt_trLN15C_form__cstmt_trLN15C_form__cstmt_t(
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* arg0,
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* arg1,
   struct _fx_rRt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t* arg2,
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* arg3,
   struct _fx_ri_data_t* arg4,
   struct _fx_rLN15C_form__cstmt_t_data_t* arg5,
   struct _fx_rLN15C_form__cstmt_t_data_t* arg6,
   struct _fx_rLN15C_form__cstmt_t_data_t* arg7,
   struct _fx_FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t* fx_result);

static int
   _fx_M11C_gen_typesFM16create_ctyp_declRM16ctyp_temp_info_t6R9Ast__id_tBR10Ast__loc_trRt6Set__t1R9Ast__id_trirLN15C_form__cstmt_t(
   struct _fx_R9Ast__id_t* tn_0,
   bool fwd_decl_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* all_fwd_decls_ref_0,
   struct _fx_ri_data_t* curr_cm_idx_ref_0,
   struct _fx_rLN15C_form__cstmt_t_data_t* top_fwd_decl_ref_0,
   struct _fx_R29C_gen_types__ctyp_temp_info_t* fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M6K_formFM8KTypNameN14K_form__ktyp_t1R9Ast__id_t(
   struct _fx_R9Ast__id_t* arg0,
   struct _fx_N14K_form__ktyp_t_data_t** fx_result);

FX_EXTERN_C int _fx_M6C_formFM7gen_idcR9Ast__id_t2iS(
   int_ m_idx_0,
   fx_str_t* s_0,
   struct _fx_R9Ast__id_t* fx_result,
   void* fx_fv);

FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g23C_form__std_fx_copy_ptr)
FX_EXTERN_C int _fx_M6K_formFM13get_idk_cnameS2R9Ast__id_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* n_0,
   struct _fx_R10Ast__loc_t* loc_0,
   fx_str_t* fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M6C_formFM10CTypStructN14C_form__ctyp_t2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t(
   struct _fx_Nt6option1R9Ast__id_t* arg0,
   struct _fx_LT2R9Ast__id_tN14C_form__ctyp_t_data_t* arg1,
   struct _fx_N14C_form__ctyp_t_data_t** fx_result);

FX_EXTERN_C int _fx_M6C_formFM8make_ptrN14C_form__ctyp_t1N14C_form__ctyp_t(
   struct _fx_N14C_form__ctyp_t_data_t* t_0,
   struct _fx_N14C_form__ctyp_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M6C_formFM14make_const_ptrN14C_form__ctyp_t1N14C_form__ctyp_t(
   struct _fx_N14C_form__ctyp_t_data_t* t_0,
   struct _fx_N14C_form__ctyp_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M6C_formFM13make_id_t_expN14C_form__cexp_t3R9Ast__id_tN14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* i_0,
   struct _fx_N14C_form__ctyp_t_data_t* t_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_N14C_form__cexp_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M8K_mangleFM9remove_fxS1S(fx_str_t* str_0, fx_str_t* fx_result, void* fx_fv);

FX_EXTERN_C int _fx_M3AstFM17default_fun_flagsRM11fun_flags_t0(struct _fx_R16Ast__fun_flags_t* fx_result, void* fx_fv);

FX_EXTERN_C void _fx_M6C_formFM4CTypN15C_form__cinfo_t1rRM9cdeftyp_t(
   struct _fx_rR17C_form__cdeftyp_t_data_t* arg0,
   struct _fx_N15C_form__cinfo_t* fx_result);

FX_EXTERN_C int _fx_M6C_formFM13set_idc_entryv2R9Ast__id_tN15C_form__cinfo_t(
   struct _fx_R9Ast__id_t* i_0,
   struct _fx_N15C_form__cinfo_t* entry_0,
   void* fx_fv);

FX_EXTERN_C int _fx_M6C_formFM14CDefForwardTypN15C_form__cstmt_t2R9Ast__id_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* arg0,
   struct _fx_R10Ast__loc_t* arg1,
   struct _fx_N15C_form__cstmt_t_data_t** fx_result);

FX_EXTERN_C void _fx_M6C_formFM4CFunN15C_form__cinfo_t1rRM9cdeffun_t(
   struct _fx_rR17C_form__cdeffun_t_data_t* arg0,
   struct _fx_N15C_form__cinfo_t* fx_result);

FX_EXTERN_C int _fx_M6C_formFM14CDefForwardSymN15C_form__cstmt_t2R9Ast__id_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* arg0,
   struct _fx_R10Ast__loc_t* arg1,
   struct _fx_N15C_form__cstmt_t_data_t** fx_result);

FX_EXTERN_C int _fx_M10K_annotateFM12get_typ_depsRt6Set__t1R9Ast__id_t2R9Ast__id_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* n_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_Rt6Set__t1R9Ast__id_t* fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M6K_formFM6kinfo_N15K_form__kinfo_t2R9Ast__id_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* n_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_N15K_form__kinfo_t* fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M11C_gen_typesFM7make_fpFPB1R9Ast__id_t1R9Ast__id_t(
   struct _fx_R9Ast__id_t* arg0,
   struct _fx_FPB1R9Ast__id_t* fx_result);

FX_EXTERN_C int
   _fx_M11C_gen_typesFM7make_fpFPv1R9Ast__id_t9rRt6Set__t1R9Ast__id_trRt6Set__t1R9Ast__id_trRt6Map__t2R9Ast__id_tRM16ctyp_temp_info_trRt6Set__t1R9Ast__id_triR10Ast__loc_trLN15C_form__cstmt_trLN15C_form__cstmt_trLN15C_form__cstmt_t(
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* arg0,
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* arg1,
   struct _fx_rRt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t* arg2,
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* arg3,
   struct _fx_ri_data_t* arg4,
   struct _fx_R10Ast__loc_t* arg5,
   struct _fx_rLN15C_form__cstmt_t_data_t* arg6,
   struct _fx_rLN15C_form__cstmt_t_data_t* arg7,
   struct _fx_rLN15C_form__cstmt_t_data_t* arg8,
   struct _fx_FPv1R9Ast__id_t* fx_result);

FX_EXTERN_C int _fx_M6C_formFM7CDefTypN15C_form__cstmt_t1rRM9cdeftyp_t(
   struct _fx_rR17C_form__cdeftyp_t_data_t* arg0,
   struct _fx_N15C_form__cstmt_t_data_t** fx_result);

FX_EXTERN_C int _fx_M6C_formFM7CDefFunN15C_form__cstmt_t1rRM9cdeffun_t(
   struct _fx_rR17C_form__cdeffun_t_data_t* arg0,
   struct _fx_N15C_form__cstmt_t_data_t** fx_result);

FX_EXTERN_C int _fx_F6stringS1i(int_ a, fx_str_t* fx_result, void* fx_fv);

FX_EXTERN_C int _fx_M6C_formFM10cexp_derefN14C_form__cexp_t1N14C_form__cexp_t(
   struct _fx_N14C_form__cexp_t_data_t* e_0,
   struct _fx_N14C_form__cexp_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M3AstFM2ppS1RM4id_t(struct _fx_R9Ast__id_t* i_0, fx_str_t* fx_result, void* fx_fv);

FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g31C_form__std_FX_FREE_LIST_SIMPLE)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g31C_form__std_fx_free_list_simple)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g29C_form__std_FX_FREE_LIST_IMPL)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g29C_form__std_FX_MAKE_LIST_IMPL)
FX_EXTERN_C int _fx_M6C_formFM7CExpTypN14C_form__cexp_t2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_N14C_form__ctyp_t_data_t* arg0,
   struct _fx_R10Ast__loc_t* arg1,
   struct _fx_N14C_form__cexp_t_data_t** fx_result);

FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g30C_form__std_FX_FREE_REF_SIMPLE)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g30C_form__std_fx_free_ref_simple)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g28C_form__std_FX_FREE_REF_IMPL)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g28C_form__std_FX_MAKE_REF_IMPL)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g22C_form__std_FX_FREE_FP)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g22C_form__std_fx_free_fp)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g22C_form__std_FX_COPY_FP)
FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g22C_form__std_fx_copy_fp)
FX_EXTERN_C int _fx_M6C_formFM9CExpUnaryN14C_form__cexp_t3N16C_form__cunary_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_N16C_form__cunary_t* arg0,
   struct _fx_N14C_form__cexp_t_data_t* arg1,
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t* arg2,
   struct _fx_N14C_form__cexp_t_data_t** fx_result);

FX_EXTERN_C int _fx_M3AstFM11get_orig_idRM4id_t1RM4id_t(
   struct _fx_R9Ast__id_t* i_0,
   struct _fx_R9Ast__id_t* fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M6C_formFM7CExpMemN14C_form__cexp_t3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_N14C_form__cexp_t_data_t* arg0,
   struct _fx_R9Ast__id_t* arg1,
   struct _fx_T2N14C_form__ctyp_tR10Ast__loc_t* arg2,
   struct _fx_N14C_form__cexp_t_data_t** fx_result);

FX_EXTERN_C int
   _fx_M6C_formFM11CStmtSwitchN15C_form__cstmt_t3N14C_form__cexp_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tR10Ast__loc_t(
   struct _fx_N14C_form__cexp_t_data_t* arg0,
   struct _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t_data_t* arg1,
   struct _fx_R10Ast__loc_t* arg2,
   struct _fx_N15C_form__cstmt_t_data_t** fx_result);

FX_EXTERN_C int _fx_M6C_formFM9CTypUnionN14C_form__ctyp_t2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t(
   struct _fx_Nt6option1R9Ast__id_t* arg0,
   struct _fx_LT2R9Ast__id_tN14C_form__ctyp_t_data_t* arg1,
   struct _fx_N14C_form__ctyp_t_data_t** fx_result);

FX_EXTERN_C_VAL(struct _fx_N14C_form__ctyp_t_data_t* _fx_g28C_form__std_fx_ifaces_t_cptr)
FX_EXTERN_C void _fx_M6C_formFM10CInterfaceN15C_form__cinfo_t1rRM15cdefinterface_t(
   struct _fx_rR23C_form__cdefinterface_t_data_t* arg0,
   struct _fx_N15C_form__cinfo_t* fx_result);

FX_EXTERN_C int _fx_M6K_formFM6stringS1N14K_form__ktyp_t(
   struct _fx_N14K_form__ktyp_t_data_t* t_0,
   fx_str_t* fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M6C_formFM13CDefInterfaceN15C_form__cstmt_t1rRM15cdefinterface_t(
   struct _fx_rR23C_form__cdefinterface_t_data_t* arg0,
   struct _fx_N15C_form__cstmt_t_data_t** fx_result);

static int _fx_M11C_gen_typesFM10__lambda__B1R9Ast__id_t(struct _fx_R9Ast__id_t* d_0, bool* fx_result, void* fx_fv);

static int _fx_M11C_gen_typesFM10__lambda__v1R9Ast__id_t(struct _fx_R9Ast__id_t* dep_0, void* fx_fv);

FX_EXTERN_C int _fx_M6K_formFM11get_idk_locR10Ast__loc_t2R9Ast__id_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* n_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_R10Ast__loc_t* fx_result,
   void* fx_fv);

static int _fx_M11C_gen_typesFM15fold_n_cvt_kexpv2N14K_form__kexp_tR22K_form__k_fold_callb_t(
   struct _fx_N14K_form__kexp_t_data_t* e_0,
   struct _fx_R22K_form__k_fold_callb_t* callb_0,
   void* fx_fv);

FX_EXTERN_C int _fx_M6K_formFM9fold_kexpv2N14K_form__kexp_tRM14k_fold_callb_t(
   struct _fx_N14K_form__kexp_t_data_t* e_0,
   struct _fx_R22K_form__k_fold_callb_t* callb_0,
   void* fx_fv);

FX_EXTERN_C int _fx_M3AstFM16empty_id_hashsetNt10Hashset__t1RM4id_t1i(
   int_ size0_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M11C_gen_typesFM7make_fpFPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t1rNt10Hashset__t1R9Ast__id_t(
   struct _fx_rNt10Hashset__t1R9Ast__id_t_data_t* arg0,
   struct _fx_FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t* fx_result);

FX_EXTERN_C int _fx_M11C_gen_typesFM7make_fpFPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t1rNt10Hashset__t1R9Ast__id_t(
   struct _fx_rNt10Hashset__t1R9Ast__id_t_data_t* arg0,
   struct _fx_FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t* fx_result);

static int _fx_M11C_gen_typesFM9used_ctypv2N14C_form__ctyp_tR22C_form__c_fold_callb_t(
   struct _fx_N14C_form__ctyp_t_data_t* t_0,
   struct _fx_R22C_form__c_fold_callb_t* callb_0,
   void* fx_fv);

FX_EXTERN_C int _fx_M6C_formFM9fold_ctypv2N14C_form__ctyp_tRM14c_fold_callb_t(
   struct _fx_N14C_form__ctyp_t_data_t* t_0,
   struct _fx_R22C_form__c_fold_callb_t* callb_0,
   void* fx_fv);

FX_EXTERN_C bool _fx_M6StringFM10startswithB2SS(fx_str_t* s, fx_str_t* prefix, void* fx_fv);

static int _fx_M11C_gen_typesFM17used_ids_by_cstmtv2N15C_form__cstmt_tR22C_form__c_fold_callb_t(
   struct _fx_N15C_form__cstmt_t_data_t* s_0,
   struct _fx_R22C_form__c_fold_callb_t* callb_0,
   void* fx_fv);

FX_EXTERN_C int _fx_M6C_formFM10fold_cstmtv2N15C_form__cstmt_tRM14c_fold_callb_t(
   struct _fx_N15C_form__cstmt_t_data_t* s_0,
   struct _fx_R22C_form__c_fold_callb_t* callb_0,
   void* fx_fv);

FX_EXTERN_C int _fx_M3AstFM17empty_str_hashsetNt10Hashset__t1S1i(
   int_ size0_0,
   struct _fx_Nt10Hashset__t1S_data_t** fx_result,
   void* fx_fv);

static int
   _fx_M11C_gen_typesFM15update_used_idsv5Nt10Hashset__t1R9Ast__id_tLN15C_form__cstmt_tR9Ast__id_tNt10Hashset__t1SNt10Hashset__t1S(
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* used_ids_0,
   struct _fx_LN15C_form__cstmt_t_data_t* all_ctypes_decl_0,
   struct _fx_R9Ast__id_t* mname_0,
   struct _fx_Nt10Hashset__t1S_data_t* used_fwd_names_0,
   struct _fx_Nt10Hashset__t1S_data_t* used_names_0,
   void* fx_fv);

static int _fx_M11C_gen_typesFM12is_used_declB5N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_tBNt10Hashset__t1SNt10Hashset__t1S(
   struct _fx_N15C_form__cstmt_t_data_t* s_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* used_ids_0,
   bool final_0,
   struct _fx_Nt10Hashset__t1S_data_t* used_fwd_names_0,
   struct _fx_Nt10Hashset__t1S_data_t* used_names_0,
   bool* fx_result,
   void* fx_fv);

FX_EXTERN_C uint64_t _fx_F4hashq1S(fx_str_t* x, void* fx_fv);

FX_EXTERN_C int _fx_M6C_formFM13get_idc_cnameS2R9Ast__id_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* i_0,
   struct _fx_R10Ast__loc_t* loc_0,
   fx_str_t* fx_result,
   void* fx_fv);

static int _fx_M11C_gen_typesFM10__lambda__B2T2R9Ast__id_tNt6option1N14C_form__cexp_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_T2R9Ast__id_tNt6option1N14C_form__cexp_t* arg0_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* used_ids_0,
   bool* fx_result,
   void* fx_fv);

FX_EXTERN_C_VAL(struct _fx_R10Ast__loc_t _fx_g10Ast__noloc)
typedef struct {
   int_ rc;
   fx_free_t free_f;
   struct _fx_R9Ast__id_t t0;
} _fx_M11C_gen_typesFM10__lambda__B1R9Ast__id_t_cldata_t;

typedef struct {
   int_ rc;
   fx_free_t free_f;
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* t0;
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* t1;
   struct _fx_rRt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t* t2;
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* t3;
   struct _fx_ri_data_t* t4;
   struct _fx_R10Ast__loc_t t5;
   struct _fx_rLN15C_form__cstmt_t_data_t* t6;
   struct _fx_rLN15C_form__cstmt_t_data_t* t7;
   struct _fx_rLN15C_form__cstmt_t_data_t* t8;
} _fx_M11C_gen_typesFM10__lambda__v1R9Ast__id_t_cldata_t;

FX_EXTERN_C void _fx_free_M11C_gen_typesFM10__lambda__v1R9Ast__id_t(_fx_M11C_gen_typesFM10__lambda__v1R9Ast__id_t_cldata_t* dst)
{
   _fx_free_rRt6Set__t1R9Ast__id_t(&dst->t0);
   _fx_free_rRt6Set__t1R9Ast__id_t(&dst->t1);
   _fx_free_rRt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&dst->t2);
   _fx_free_rRt6Set__t1R9Ast__id_t(&dst->t3);
   FX_FREE_REF_SIMPLE(&dst->t4);
   _fx_free_rLN15C_form__cstmt_t(&dst->t6);
   _fx_free_rLN15C_form__cstmt_t(&dst->t7);
   _fx_free_rLN15C_form__cstmt_t(&dst->t8);
   fx_free(dst);
}

typedef struct {
   int_ rc;
   fx_free_t free_f;
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* t0;
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* t1;
   struct _fx_rRt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t* t2;
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* t3;
   struct _fx_ri_data_t* t4;
   struct _fx_rLN15C_form__cstmt_t_data_t* t5;
   struct _fx_rLN15C_form__cstmt_t_data_t* t6;
   struct _fx_rLN15C_form__cstmt_t_data_t* t7;
} _fx_M11C_gen_typesFM15fold_n_cvt_kexpv2N14K_form__kexp_tR22K_form__k_fold_callb_t_cldata_t;

FX_EXTERN_C void _fx_free_M11C_gen_typesFM15fold_n_cvt_kexpv2N14K_form__kexp_tR22K_form__k_fold_callb_t(
   _fx_M11C_gen_typesFM15fold_n_cvt_kexpv2N14K_form__kexp_tR22K_form__k_fold_callb_t_cldata_t* dst)
{
   _fx_free_rRt6Set__t1R9Ast__id_t(&dst->t0);
   _fx_free_rRt6Set__t1R9Ast__id_t(&dst->t1);
   _fx_free_rRt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&dst->t2);
   _fx_free_rRt6Set__t1R9Ast__id_t(&dst->t3);
   FX_FREE_REF_SIMPLE(&dst->t4);
   _fx_free_rLN15C_form__cstmt_t(&dst->t5);
   _fx_free_rLN15C_form__cstmt_t(&dst->t6);
   _fx_free_rLN15C_form__cstmt_t(&dst->t7);
   fx_free(dst);
}

typedef struct {
   int_ rc;
   fx_free_t free_f;
   struct _fx_rNt10Hashset__t1R9Ast__id_t_data_t* t0;
} _fx_M11C_gen_typesFM9used_ctypv2N14C_form__ctyp_tR22C_form__c_fold_callb_t_cldata_t;

FX_EXTERN_C void _fx_free_M11C_gen_typesFM9used_ctypv2N14C_form__ctyp_tR22C_form__c_fold_callb_t(
   _fx_M11C_gen_typesFM9used_ctypv2N14C_form__ctyp_tR22C_form__c_fold_callb_t_cldata_t* dst)
{
   _fx_free_rNt10Hashset__t1R9Ast__id_t(&dst->t0);
   fx_free(dst);
}

typedef struct {
   int_ rc;
   fx_free_t free_f;
   struct _fx_rNt10Hashset__t1R9Ast__id_t_data_t* t0;
} _fx_M11C_gen_typesFM17used_ids_by_cstmtv2N15C_form__cstmt_tR22C_form__c_fold_callb_t_cldata_t;

FX_EXTERN_C void _fx_free_M11C_gen_typesFM17used_ids_by_cstmtv2N15C_form__cstmt_tR22C_form__c_fold_callb_t(
   _fx_M11C_gen_typesFM17used_ids_by_cstmtv2N15C_form__cstmt_tR22C_form__c_fold_callb_t_cldata_t* dst)
{
   _fx_free_rNt10Hashset__t1R9Ast__id_t(&dst->t0);
   fx_free(dst);
}

FX_EXTERN_C void _fx_M11C_gen_typesFM4SomeNt6option1RM16ctyp_temp_info_t1RM16ctyp_temp_info_t(
   struct _fx_R29C_gen_types__ctyp_temp_info_t* arg0,
   struct _fx_Nt6option1R29C_gen_types__ctyp_temp_info_t* fx_result)
{
   fx_result->tag = 2;
   _fx_copy_R29C_gen_types__ctyp_temp_info_t(arg0, &fx_result->u.Some);
}

FX_EXTERN_C int
   _fx_M11C_gen_typesFM4SomeNt6option1FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t1FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t(
   struct _fx_FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t* arg0,
   struct _fx_Nt6option1FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt6option1FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t);
   FX_COPY_FP(arg0, &v->u.Some);
   return 0;
}

FX_EXTERN_C int
   _fx_M11C_gen_typesFM4SomeNt6option1FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t1FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t(
   struct _fx_FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t* arg0,
   struct _fx_Nt6option1FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt6option1FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t);
   FX_COPY_FP(arg0, &v->u.Some);
   return 0;
}

FX_EXTERN_C void _fx_M11C_gen_typesFM4SomeNt6option1N14C_form__cexp_t1N14C_form__cexp_t(
   struct _fx_N14C_form__cexp_t_data_t* arg0,
   struct _fx_Nt6option1N14C_form__cexp_t* fx_result)
{
   fx_result->tag = 2;
   FX_COPY_PTR(arg0, &fx_result->u.Some);
}

FX_EXTERN_C int
   _fx_M11C_gen_typesFM4SomeNt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t(
   struct _fx_FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t* arg0,
   struct _fx_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t);
   FX_COPY_FP(arg0, &v->u.Some);
   return 0;
}

FX_EXTERN_C int
   _fx_M11C_gen_typesFM4SomeNt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t(
   struct _fx_FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t* arg0,
   struct _fx_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t);
   FX_COPY_FP(arg0, &v->u.Some);
   return 0;
}

FX_EXTERN_C void _fx_M11C_gen_typesFM4SomeNt6option1R9Ast__id_t1R9Ast__id_t(
   struct _fx_R9Ast__id_t* arg0,
   struct _fx_Nt6option1R9Ast__id_t* fx_result)
{
   fx_result->tag = 2;
   fx_result->u.Some = *arg0;
}

FX_EXTERN_C void _fx_M11C_gen_typesFM5link2LN15C_form__cstmt_t2LN15C_form__cstmt_tLN15C_form__cstmt_t(
   struct _fx_LN15C_form__cstmt_t_data_t* l1,
   struct _fx_LN15C_form__cstmt_t_data_t* l2,
   struct _fx_LN15C_form__cstmt_t_data_t** fx_result,
   void* fx_fv)
{
   
fx_link_lists(l1, l2, fx_result);

}

FX_EXTERN_C void _fx_M11C_gen_typesFM5link2LN14C_form__ctyp_t2LN14C_form__ctyp_tLN14C_form__ctyp_t(
   struct _fx_LN14C_form__ctyp_t_data_t* l1,
   struct _fx_LN14C_form__ctyp_t_data_t* l2,
   struct _fx_LN14C_form__ctyp_t_data_t** fx_result,
   void* fx_fv)
{
   
fx_link_lists(l1, l2, fx_result);

}

FX_EXTERN_C int _fx_M11C_gen_typesFM6stringS1S(fx_str_t* a_0, fx_str_t* fx_result, void* fx_fv)
{
   int fx_status = 0;
   fx_copy_str(a_0, fx_result);
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM3revLT2LN14C_form__cexp_tLN15C_form__cstmt_t1LT2LN14C_form__cexp_tLN15C_form__cstmt_t(
   struct _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t_data_t* l_0,
   struct _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t __fold_result___0 = 0;
   int fx_status = 0;
   _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t lst_0 = l_0;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t r_0 = 0;
      _fx_T2LN14C_form__cexp_tLN15C_form__cstmt_t* a_0 = &lst_0->hd;
      FX_COPY_PTR(__fold_result___0, &r_0);
      FX_CALL(_fx_cons_LT2LN14C_form__cexp_tLN15C_form__cstmt_t(a_0, r_0, false, &r_0), _fx_catch_0);
      _fx_free_LT2LN14C_form__cexp_tLN15C_form__cstmt_t(&__fold_result___0);
      FX_COPY_PTR(r_0, &__fold_result___0);

   _fx_catch_0: ;
      if (r_0) {
         _fx_free_LT2LN14C_form__cexp_tLN15C_form__cstmt_t(&r_0);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }
   FX_COPY_PTR(__fold_result___0, fx_result);

_fx_cleanup: ;
   if (__fold_result___0) {
      _fx_free_LT2LN14C_form__cexp_tLN15C_form__cstmt_t(&__fold_result___0);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM3revLT2R9Ast__id_tN14C_form__ctyp_t1LT2R9Ast__id_tN14C_form__ctyp_t(
   struct _fx_LT2R9Ast__id_tN14C_form__ctyp_t_data_t* l_0,
   struct _fx_LT2R9Ast__id_tN14C_form__ctyp_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_LT2R9Ast__id_tN14C_form__ctyp_t __fold_result___0 = 0;
   int fx_status = 0;
   _fx_LT2R9Ast__id_tN14C_form__ctyp_t lst_0 = l_0;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_LT2R9Ast__id_tN14C_form__ctyp_t r_0 = 0;
      _fx_T2R9Ast__id_tN14C_form__ctyp_t* a_0 = &lst_0->hd;
      FX_COPY_PTR(__fold_result___0, &r_0);
      FX_CALL(_fx_cons_LT2R9Ast__id_tN14C_form__ctyp_t(a_0, r_0, false, &r_0), _fx_catch_0);
      _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&__fold_result___0);
      FX_COPY_PTR(r_0, &__fold_result___0);

   _fx_catch_0: ;
      if (r_0) {
         _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&r_0);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }
   FX_COPY_PTR(__fold_result___0, fx_result);

_fx_cleanup: ;
   if (__fold_result___0) {
      _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&__fold_result___0);
   }
   return fx_status;
}

FX_EXTERN_C int
   _fx_M11C_gen_typesFM3revLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t1LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
   struct _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t_data_t* l_0,
   struct _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t __fold_result___0 = 0;
   int fx_status = 0;
   _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t lst_0 = l_0;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t r_0 = 0;
      _fx_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t* a_0 = &lst_0->hd;
      FX_COPY_PTR(__fold_result___0, &r_0);
      FX_CALL(_fx_cons_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(a_0, r_0, false, &r_0), _fx_catch_0);
      _fx_free_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&__fold_result___0);
      FX_COPY_PTR(r_0, &__fold_result___0);

   _fx_catch_0: ;
      if (r_0) {
         _fx_free_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&r_0);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }
   FX_COPY_PTR(__fold_result___0, fx_result);

_fx_cleanup: ;
   if (__fold_result___0) {
      _fx_free_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&__fold_result___0);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM3revLN15C_form__cstmt_t1LN15C_form__cstmt_t(
   struct _fx_LN15C_form__cstmt_t_data_t* l_0,
   struct _fx_LN15C_form__cstmt_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_LN15C_form__cstmt_t __fold_result___0 = 0;
   int fx_status = 0;
   _fx_LN15C_form__cstmt_t lst_0 = l_0;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_LN15C_form__cstmt_t r_0 = 0;
      _fx_N15C_form__cstmt_t a_0 = lst_0->hd;
      FX_COPY_PTR(__fold_result___0, &r_0);
      FX_CALL(_fx_cons_LN15C_form__cstmt_t(a_0, r_0, false, &r_0), _fx_catch_0);
      _fx_free_LN15C_form__cstmt_t(&__fold_result___0);
      FX_COPY_PTR(r_0, &__fold_result___0);

   _fx_catch_0: ;
      if (r_0) {
         _fx_free_LN15C_form__cstmt_t(&r_0);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }
   FX_COPY_PTR(__fold_result___0, fx_result);

_fx_cleanup: ;
   if (__fold_result___0) {
      _fx_free_LN15C_form__cstmt_t(&__fold_result___0);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM9add_fast_i4iA1iA1Rt24Hashset__hashset_entry_t1SRt24Hashset__hashset_entry_t1S(
   int_ tabsz_0,
   fx_arr_t* ht_index_0,
   fx_arr_t* ht_table_0,
   struct _fx_Rt24Hashset__hashset_entry_t1S* entry_0,
   int_* fx_result,
   void* fx_fv)
{
   fx_exn_t v_0 = {0};
   int fx_status = 0;
   int_ idxsz_0 = FX_ARR_SIZE(*ht_index_0, 0);
   uint64_t hv_0 = entry_0->hv;
   uint64_t perturb_0 = hv_0;
   int_ j_0 = (int_)hv_0 & (idxsz_0 - 1);
   bool found_free_slot_0 = false;
   int_ v_1 = idxsz_0 + 14;
   for (int_ i_0 = 0; i_0 < v_1; i_0++) {
      FX_CHKIDX(FX_CHKIDX1(*ht_index_0, 0, j_0), _fx_catch_0);
      int_ tidx_0 = *FX_PTR_1D(int_, *ht_index_0, j_0);
      if (tidx_0 == 0) {
         FX_CHKIDX(FX_CHKIDX1(*ht_index_0, 0, j_0), _fx_catch_0);
         *FX_PTR_1D(int_, *ht_index_0, j_0) = tabsz_0 + 2;
         FX_CHKIDX(FX_CHKIDX1(*ht_table_0, 0, tabsz_0), _fx_catch_0);
         _fx_Rt24Hashset__hashset_entry_t1S* v_2 = FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1S, *ht_table_0, tabsz_0);
         _fx_free_Rt24Hashset__hashset_entry_t1S(v_2);
         _fx_copy_Rt24Hashset__hashset_entry_t1S(entry_0, v_2);
         found_free_slot_0 = true;
         FX_BREAK(_fx_catch_0);
      }
      perturb_0 = perturb_0 >> 5;
      j_0 = (int_)((uint64_t)(j_0 * 5 + 1) + perturb_0) & (idxsz_0 - 1);

   _fx_catch_0: ;
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   if (!found_free_slot_0) {
      fx_str_t slit_0 = FX_MAKE_STR("cannot insert element (full Hashtable?!)");
      FX_CALL(_fx_F9make_FailE1S(&slit_0, &v_0), _fx_cleanup);
      FX_THROW(&v_0, true, _fx_cleanup);
   }
   *fx_result = tabsz_0 + 1;

_fx_cleanup: ;
   fx_free_exn(&v_0);
   return fx_status;
}

FX_EXTERN_C int
   _fx_M11C_gen_typesFM9add_fast_i4iA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_tRt24Hashset__hashset_entry_t1R9Ast__id_t(
   int_ tabsz_0,
   fx_arr_t* ht_index_0,
   fx_arr_t* ht_table_0,
   struct _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t* entry_0,
   int_* fx_result,
   void* fx_fv)
{
   fx_exn_t v_0 = {0};
   int fx_status = 0;
   int_ idxsz_0 = FX_ARR_SIZE(*ht_index_0, 0);
   uint64_t hv_0 = entry_0->hv;
   uint64_t perturb_0 = hv_0;
   int_ j_0 = (int_)hv_0 & (idxsz_0 - 1);
   bool found_free_slot_0 = false;
   int_ v_1 = idxsz_0 + 14;
   for (int_ i_0 = 0; i_0 < v_1; i_0++) {
      FX_CHKIDX(FX_CHKIDX1(*ht_index_0, 0, j_0), _fx_catch_0);
      int_ tidx_0 = *FX_PTR_1D(int_, *ht_index_0, j_0);
      if (tidx_0 == 0) {
         FX_CHKIDX(FX_CHKIDX1(*ht_index_0, 0, j_0), _fx_catch_0);
         *FX_PTR_1D(int_, *ht_index_0, j_0) = tabsz_0 + 2;
         FX_CHKIDX(FX_CHKIDX1(*ht_table_0, 0, tabsz_0), _fx_catch_0);
         *FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, *ht_table_0, tabsz_0) = *entry_0;
         found_free_slot_0 = true;
         FX_BREAK(_fx_catch_0);
      }
      perturb_0 = perturb_0 >> 5;
      j_0 = (int_)((uint64_t)(j_0 * 5 + 1) + perturb_0) & (idxsz_0 - 1);

   _fx_catch_0: ;
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   if (!found_free_slot_0) {
      fx_str_t slit_0 = FX_MAKE_STR("cannot insert element (full Hashtable?!)");
      FX_CALL(_fx_F9make_FailE1S(&slit_0, &v_0), _fx_cleanup);
      FX_THROW(&v_0, true, _fx_cleanup);
   }
   *fx_result = tabsz_0 + 1;

_fx_cleanup: ;
   fx_free_exn(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM4growv2Nt10Hashset__t1Si(
   struct _fx_Nt10Hashset__t1S_data_t* self_0,
   int_ new_size_0,
   void* fx_fv)
{
   fx_arr_t ht_table_0 = {0};
   _fx_Rt24Hashset__hashset_entry_t1S v_0 = {0};
   fx_arr_t new_ht_table_0 = {0};
   fx_arr_t new_ht_index_0 = {0};
   int fx_status = 0;
   fx_copy_arr(&self_0->u.t.t5, &ht_table_0);
   _fx_copy_Rt24Hashset__hashset_entry_t1S(&self_0->u.t.t0, &v_0);
   _fx_Rt24Hashset__hashset_entry_t1S* dstptr_0 = 0;
   {
      const int_ shape_0[] = { new_size_0 };
      FX_CALL(
         fx_make_arr(1, shape_0, sizeof(_fx_Rt24Hashset__hashset_entry_t1S), (fx_free_t)_fx_free_Rt24Hashset__hashset_entry_t1S,
            (fx_copy_t)_fx_copy_Rt24Hashset__hashset_entry_t1S, 0, &new_ht_table_0), _fx_cleanup);
   }
   dstptr_0 = (_fx_Rt24Hashset__hashset_entry_t1S*)new_ht_table_0.data;
   for (int_ i_0 = 0; i_0 < new_size_0; i_0++, dstptr_0++) {
      _fx_copy_Rt24Hashset__hashset_entry_t1S(&v_0, dstptr_0);
   }
   FX_CALL(_fx_M7HashsetFM9makeindexA1i1i(new_size_0 * 2, &new_ht_index_0, 0), _fx_cleanup);
   int_ tabsz_0 = 0;
   int_ v_1 = self_0->u.t.t2;
   for (int_ j_0 = 0; j_0 < v_1; j_0++) {
      _fx_Rt24Hashset__hashset_entry_t1S v_2 = {0};
      FX_CHKIDX(FX_CHKIDX1(ht_table_0, 0, j_0), _fx_catch_0);
      if (FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1S, ht_table_0, j_0)->hv < 9223372036854775808ULL) {
         FX_CHKIDX(FX_CHKIDX1(ht_table_0, 0, j_0), _fx_catch_0);
         _fx_copy_Rt24Hashset__hashset_entry_t1S(FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1S, ht_table_0, j_0), &v_2);
         int_ v_3;
         FX_CALL(
            _fx_M11C_gen_typesFM9add_fast_i4iA1iA1Rt24Hashset__hashset_entry_t1SRt24Hashset__hashset_entry_t1S(tabsz_0,
               &new_ht_index_0, &new_ht_table_0, &v_2, &v_3, 0), _fx_catch_0);
         tabsz_0 = v_3;
      }

   _fx_catch_0: ;
      _fx_free_Rt24Hashset__hashset_entry_t1S(&v_2);
      FX_CHECK_EXN(_fx_cleanup);
   }
   fx_arr_t* v_4 = &self_0->u.t.t4;
   FX_FREE_ARR(v_4);
   fx_copy_arr(&new_ht_index_0, v_4);
   fx_arr_t* v_5 = &self_0->u.t.t5;
   FX_FREE_ARR(v_5);
   fx_copy_arr(&new_ht_table_0, v_5);
   self_0->u.t.t2 = tabsz_0;
   self_0->u.t.t3 = 0;

_fx_cleanup: ;
   FX_FREE_ARR(&ht_table_0);
   _fx_free_Rt24Hashset__hashset_entry_t1S(&v_0);
   FX_FREE_ARR(&new_ht_table_0);
   FX_FREE_ARR(&new_ht_index_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM4growv2Nt10Hashset__t1R9Ast__id_ti(
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* self_0,
   int_ new_size_0,
   void* fx_fv)
{
   fx_arr_t ht_table_0 = {0};
   fx_arr_t new_ht_table_0 = {0};
   fx_arr_t new_ht_index_0 = {0};
   int fx_status = 0;
   fx_copy_arr(&self_0->u.t.t5, &ht_table_0);
   _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t v_0 = self_0->u.t.t0;
   _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t* dstptr_0 = 0;
   {
      const int_ shape_0[] = { new_size_0 };
      FX_CALL(fx_make_arr(1, shape_0, sizeof(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t), 0, 0, 0, &new_ht_table_0),
         _fx_cleanup);
   }
   dstptr_0 = (_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t*)new_ht_table_0.data;
   for (int_ i_0 = 0; i_0 < new_size_0; i_0++, dstptr_0++) {
      *dstptr_0 = v_0;
   }
   FX_CALL(_fx_M7HashsetFM9makeindexA1i1i(new_size_0 * 2, &new_ht_index_0, 0), _fx_cleanup);
   int_ tabsz_0 = 0;
   int_ v_1 = self_0->u.t.t2;
   for (int_ j_0 = 0; j_0 < v_1; j_0++) {
      FX_CHKIDX(FX_CHKIDX1(ht_table_0, 0, j_0), _fx_catch_0);
      if (FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, ht_table_0, j_0)->hv < 9223372036854775808ULL) {
         FX_CHKIDX(FX_CHKIDX1(ht_table_0, 0, j_0), _fx_catch_0);
         _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t v_2 =
            *FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, ht_table_0, j_0);
         int_ v_3;
         FX_CALL(
            _fx_M11C_gen_typesFM9add_fast_i4iA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_tRt24Hashset__hashset_entry_t1R9Ast__id_t(
               tabsz_0, &new_ht_index_0, &new_ht_table_0, &v_2, &v_3, 0), _fx_catch_0);
         tabsz_0 = v_3;
      }

   _fx_catch_0: ;
      FX_CHECK_EXN(_fx_cleanup);
   }
   fx_arr_t* v_4 = &self_0->u.t.t4;
   FX_FREE_ARR(v_4);
   fx_copy_arr(&new_ht_index_0, v_4);
   fx_arr_t* v_5 = &self_0->u.t.t5;
   FX_FREE_ARR(v_5);
   fx_copy_arr(&new_ht_table_0, v_5);
   self_0->u.t.t2 = tabsz_0;
   self_0->u.t.t3 = 0;

_fx_cleanup: ;
   FX_FREE_ARR(&ht_table_0);
   FX_FREE_ARR(&new_ht_table_0);
   FX_FREE_ARR(&new_ht_index_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM9find_idx_Ta2i3Nt10Hashset__t1SSq(
   struct _fx_Nt10Hashset__t1S_data_t* self_0,
   fx_str_t* k_0,
   uint64_t hv_0,
   struct _fx_Ta2i* fx_result,
   void* fx_fv)
{
   fx_arr_t v_0 = {0};
   int fx_status = 0;
   fx_copy_arr(&self_0->u.t.t4, &v_0);
   int_ idxsz_0 = FX_ARR_SIZE(v_0, 0);
   uint64_t perturb_0 = hv_0;
   int_ found_0 = -1;
   int_ j_0 = (int_)hv_0 & (idxsz_0 - 1);
   int_ v_1 = idxsz_0 + 14;
   for (int_ i_0 = 0; i_0 < v_1; i_0++) {
      _fx_Rt24Hashset__hashset_entry_t1S entry_0 = {0};
      fx_str_t v_2 = {0};
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, j_0), _fx_catch_0);
      int_ tidx_0 = *FX_PTR_1D(int_, self_0->u.t.t4, j_0);
      if (tidx_0 >= 2) {
         int_ v_3 = tidx_0 - 2;
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, v_3), _fx_catch_0);
         _fx_copy_Rt24Hashset__hashset_entry_t1S(FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1S, self_0->u.t.t5, v_3), &entry_0);
         bool v_4;
         if (entry_0.hv == hv_0) {
            fx_copy_str(&entry_0.key, &v_2); v_4 = _fx_F6__eq__B2SS(&v_2, k_0, 0);
         }
         else {
            v_4 = false;
         }
         if (v_4) {
            found_0 = tidx_0 - 2; FX_BREAK(_fx_catch_0);
         }
      }
      else if (tidx_0 == 0) {
         FX_BREAK(_fx_catch_0);
      }
      perturb_0 = perturb_0 >> 5;
      j_0 = (int_)((uint64_t)(j_0 * 5 + 1) + perturb_0) & (idxsz_0 - 1);

   _fx_catch_0: ;
      FX_FREE_STR(&v_2);
      _fx_free_Rt24Hashset__hashset_entry_t1S(&entry_0);
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   _fx_Ta2i tup_0 = { j_0, found_0 };
   *fx_result = tup_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM9find_idx_Ta2i3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* self_0,
   struct _fx_R9Ast__id_t* k_0,
   uint64_t hv_0,
   struct _fx_Ta2i* fx_result,
   void* fx_fv)
{
   fx_arr_t v_0 = {0};
   int fx_status = 0;
   fx_copy_arr(&self_0->u.t.t4, &v_0);
   int_ idxsz_0 = FX_ARR_SIZE(v_0, 0);
   uint64_t perturb_0 = hv_0;
   int_ found_0 = -1;
   int_ j_0 = (int_)hv_0 & (idxsz_0 - 1);
   int_ v_1 = idxsz_0 + 14;
   for (int_ i_0 = 0; i_0 < v_1; i_0++) {
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, j_0), _fx_catch_0);
      int_ tidx_0 = *FX_PTR_1D(int_, self_0->u.t.t4, j_0);
      if (tidx_0 >= 2) {
         int_ v_2 = tidx_0 - 2;
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, v_2), _fx_catch_0);
         _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t entry_0 =
            *FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, self_0->u.t.t5, v_2);
         bool t_0;
         if (entry_0.hv == hv_0) {
            _fx_R9Ast__id_t v_3 = entry_0.key;
            bool __fold_result___0 = true;
            bool t_1;
            if (v_3.m == k_0->m) {
               t_1 = __fold_result___0;
            }
            else {
               t_1 = false;
            }
            __fold_result___0 = t_1;
            bool t_2;
            if (v_3.i == k_0->i) {
               t_2 = __fold_result___0;
            }
            else {
               t_2 = false;
            }
            __fold_result___0 = t_2;
            bool t_3;
            if (v_3.j == k_0->j) {
               t_3 = __fold_result___0;
            }
            else {
               t_3 = false;
            }
            __fold_result___0 = t_3;
            t_0 = __fold_result___0;
         }
         else {
            t_0 = false;
         }
         if (t_0) {
            found_0 = tidx_0 - 2; FX_BREAK(_fx_catch_0);
         }
      }
      else if (tidx_0 == 0) {
         FX_BREAK(_fx_catch_0);
      }
      perturb_0 = perturb_0 >> 5;
      j_0 = (int_)((uint64_t)(j_0 * 5 + 1) + perturb_0) & (idxsz_0 - 1);

   _fx_catch_0: ;
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   _fx_Ta2i tup_0 = { j_0, found_0 };
   *fx_result = tup_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM3memB2Nt10Hashset__t1R9Ast__id_tR9Ast__id_t(
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* self_0,
   struct _fx_R9Ast__id_t* k_0,
   bool* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   uint64_t __fold_result___0 = 14695981039346656037ULL;
   uint64_t h_0 = __fold_result___0 ^ ((uint64_t)k_0->m ^ 14695981039346656037ULL);
   __fold_result___0 = h_0 * 1099511628211ULL;
   uint64_t h_1 = __fold_result___0 ^ ((uint64_t)k_0->i ^ 14695981039346656037ULL);
   __fold_result___0 = h_1 * 1099511628211ULL;
   uint64_t h_2 = __fold_result___0 ^ ((uint64_t)k_0->j ^ 14695981039346656037ULL);
   __fold_result___0 = h_2 * 1099511628211ULL;
   _fx_Ta2i v_0;
   FX_CALL(
      _fx_M11C_gen_typesFM9find_idx_Ta2i3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(self_0, k_0,
         __fold_result___0 & 9223372036854775807ULL, &v_0, 0), _fx_cleanup);
   *fx_result = v_0.t1 >= 0;

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM4add_v3Nt10Hashset__t1SSq(
   struct _fx_Nt10Hashset__t1S_data_t* self_0,
   fx_str_t* k_0,
   uint64_t hv_0,
   void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t v_1 = {0};
   _fx_Rt24Hashset__hashset_entry_t1S v_2 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   fx_copy_arr(&self_0->u.t.t4, &v_0);
   int_ idxsz_0 = FX_ARR_SIZE(v_0, 0);
   if (self_0->u.t.t1 + 1 > idxsz_0 >> 1) {
      while (idxsz_0 < (self_0->u.t.t1 + 1) * 2) {
         idxsz_0 = idxsz_0 * 2;
      }
      FX_CALL(_fx_M11C_gen_typesFM4growv2Nt10Hashset__t1Si(self_0, fx_maxi(idxsz_0 / 2, self_0->u.t.t1 + 1), 0), _fx_cleanup);
   }
   uint64_t perturb_0 = hv_0;
   int_ found_0 = -1;
   int_ insert_idx_0 = -1;
   int_ j_0 = (int_)hv_0 & (idxsz_0 - 1);
   int_ v_4 = idxsz_0 + 14;
   for (int_ i_0 = 0; i_0 < v_4; i_0++) {
      _fx_Rt24Hashset__hashset_entry_t1S entry_0 = {0};
      fx_str_t v_5 = {0};
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, j_0), _fx_catch_0);
      int_ tidx_0 = *FX_PTR_1D(int_, self_0->u.t.t4, j_0);
      if (tidx_0 >= 2) {
         int_ v_6 = tidx_0 - 2;
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, v_6), _fx_catch_0);
         _fx_copy_Rt24Hashset__hashset_entry_t1S(FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1S, self_0->u.t.t5, v_6), &entry_0);
         bool v_7;
         if (entry_0.hv == hv_0) {
            fx_copy_str(&entry_0.key, &v_5); v_7 = _fx_F6__eq__B2SS(&v_5, k_0, 0);
         }
         else {
            v_7 = false;
         }
         if (v_7) {
            found_0 = tidx_0 - 2; FX_BREAK(_fx_catch_0);
         }
      }
      else if (tidx_0 == 0) {
         if (insert_idx_0 < 0) {
            insert_idx_0 = j_0;
         }
         FX_BREAK(_fx_catch_0);
      }
      else {
         bool t_0;
         if (tidx_0 == 1) {
            t_0 = insert_idx_0 < 0;
         }
         else {
            t_0 = false;
         }
         if (t_0) {
            insert_idx_0 = j_0;
         }
      }
      perturb_0 = perturb_0 >> 5;
      j_0 = (int_)((uint64_t)(j_0 * 5 + 1) + perturb_0) & (idxsz_0 - 1);

   _fx_catch_0: ;
      FX_FREE_STR(&v_5);
      _fx_free_Rt24Hashset__hashset_entry_t1S(&entry_0);
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   if (found_0 >= 0) {
      bool t_1;
      if (insert_idx_0 >= 0) {
         t_1 = insert_idx_0 != j_0;
      }
      else {
         t_1 = false;
      }
      if (t_1) {
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, insert_idx_0), _fx_cleanup);
         *FX_PTR_1D(int_, self_0->u.t.t4, insert_idx_0) = found_0 + 2;
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, j_0), _fx_cleanup);
         *FX_PTR_1D(int_, self_0->u.t.t4, j_0) = 1;
      }
   }
   else if (insert_idx_0 >= 0) {
      found_0 = self_0->u.t.t3 - 1;
      if (found_0 >= 0) {
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, found_0), _fx_cleanup);
         self_0->u.t.t3 =
            (int_)(FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1S, self_0->u.t.t5, found_0)->hv & 9223372036854775807ULL);
      }
      else {
         found_0 = self_0->u.t.t2;
         self_0->u.t.t2 = self_0->u.t.t2 + 1;
         fx_copy_arr(&self_0->u.t.t5, &v_1);
         FX_CALL(_fx_F6assertv1B(found_0 < FX_ARR_SIZE(v_1, 0), 0), _fx_cleanup);
      }
      _fx_make_Rt24Hashset__hashset_entry_t1S(hv_0, k_0, &v_2);
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, found_0), _fx_cleanup);
      _fx_Rt24Hashset__hashset_entry_t1S* v_8 = FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1S, self_0->u.t.t5, found_0);
      _fx_free_Rt24Hashset__hashset_entry_t1S(v_8);
      _fx_copy_Rt24Hashset__hashset_entry_t1S(&v_2, v_8);
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, insert_idx_0), _fx_cleanup);
      *FX_PTR_1D(int_, self_0->u.t.t4, insert_idx_0) = found_0 + 2;
      self_0->u.t.t1 = self_0->u.t.t1 + 1;
   }
   else {
      fx_str_t slit_0 = FX_MAKE_STR("cannot insert element (full Hashtable?!)");
      FX_CALL(_fx_F9make_FailE1S(&slit_0, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&v_1);
   _fx_free_Rt24Hashset__hashset_entry_t1S(&v_2);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM4add_v3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* self_0,
   struct _fx_R9Ast__id_t* k_0,
   uint64_t hv_0,
   void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t v_1 = {0};
   fx_exn_t v_2 = {0};
   int fx_status = 0;
   fx_copy_arr(&self_0->u.t.t4, &v_0);
   int_ idxsz_0 = FX_ARR_SIZE(v_0, 0);
   if (self_0->u.t.t1 + 1 > idxsz_0 >> 1) {
      while (idxsz_0 < (self_0->u.t.t1 + 1) * 2) {
         idxsz_0 = idxsz_0 * 2;
      }
      FX_CALL(_fx_M11C_gen_typesFM4growv2Nt10Hashset__t1R9Ast__id_ti(self_0, fx_maxi(idxsz_0 / 2, self_0->u.t.t1 + 1), 0),
         _fx_cleanup);
   }
   uint64_t perturb_0 = hv_0;
   int_ found_0 = -1;
   int_ insert_idx_0 = -1;
   int_ j_0 = (int_)hv_0 & (idxsz_0 - 1);
   int_ v_3 = idxsz_0 + 14;
   for (int_ i_0 = 0; i_0 < v_3; i_0++) {
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, j_0), _fx_catch_0);
      int_ tidx_0 = *FX_PTR_1D(int_, self_0->u.t.t4, j_0);
      if (tidx_0 >= 2) {
         int_ v_4 = tidx_0 - 2;
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, v_4), _fx_catch_0);
         _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t entry_0 =
            *FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, self_0->u.t.t5, v_4);
         bool t_0;
         if (entry_0.hv == hv_0) {
            _fx_R9Ast__id_t v_5 = entry_0.key;
            bool __fold_result___0 = true;
            bool t_1;
            if (v_5.m == k_0->m) {
               t_1 = __fold_result___0;
            }
            else {
               t_1 = false;
            }
            __fold_result___0 = t_1;
            bool t_2;
            if (v_5.i == k_0->i) {
               t_2 = __fold_result___0;
            }
            else {
               t_2 = false;
            }
            __fold_result___0 = t_2;
            bool t_3;
            if (v_5.j == k_0->j) {
               t_3 = __fold_result___0;
            }
            else {
               t_3 = false;
            }
            __fold_result___0 = t_3;
            t_0 = __fold_result___0;
         }
         else {
            t_0 = false;
         }
         if (t_0) {
            found_0 = tidx_0 - 2; FX_BREAK(_fx_catch_0);
         }
      }
      else if (tidx_0 == 0) {
         if (insert_idx_0 < 0) {
            insert_idx_0 = j_0;
         }
         FX_BREAK(_fx_catch_0);
      }
      else {
         bool t_4;
         if (tidx_0 == 1) {
            t_4 = insert_idx_0 < 0;
         }
         else {
            t_4 = false;
         }
         if (t_4) {
            insert_idx_0 = j_0;
         }
      }
      perturb_0 = perturb_0 >> 5;
      j_0 = (int_)((uint64_t)(j_0 * 5 + 1) + perturb_0) & (idxsz_0 - 1);

   _fx_catch_0: ;
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   if (found_0 >= 0) {
      bool t_5;
      if (insert_idx_0 >= 0) {
         t_5 = insert_idx_0 != j_0;
      }
      else {
         t_5 = false;
      }
      if (t_5) {
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, insert_idx_0), _fx_cleanup);
         *FX_PTR_1D(int_, self_0->u.t.t4, insert_idx_0) = found_0 + 2;
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, j_0), _fx_cleanup);
         *FX_PTR_1D(int_, self_0->u.t.t4, j_0) = 1;
      }
   }
   else if (insert_idx_0 >= 0) {
      found_0 = self_0->u.t.t3 - 1;
      if (found_0 >= 0) {
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, found_0), _fx_cleanup);
         self_0->u.t.t3 =
            (int_)
               (FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, self_0->u.t.t5, found_0)->hv & 9223372036854775807ULL);
      }
      else {
         found_0 = self_0->u.t.t2;
         self_0->u.t.t2 = self_0->u.t.t2 + 1;
         fx_copy_arr(&self_0->u.t.t5, &v_1);
         FX_CALL(_fx_F6assertv1B(found_0 < FX_ARR_SIZE(v_1, 0), 0), _fx_cleanup);
      }
      _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t v_6 = { hv_0, *k_0 };
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, found_0), _fx_cleanup);
      *FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, self_0->u.t.t5, found_0) = v_6;
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, insert_idx_0), _fx_cleanup);
      *FX_PTR_1D(int_, self_0->u.t.t4, insert_idx_0) = found_0 + 2;
      self_0->u.t.t1 = self_0->u.t.t1 + 1;
   }
   else {
      fx_str_t slit_0 = FX_MAKE_STR("cannot insert element (full Hashtable?!)");
      FX_CALL(_fx_F9make_FailE1S(&slit_0, &v_2), _fx_cleanup);
      FX_THROW(&v_2, true, _fx_cleanup);
   }

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&v_1);
   fx_free_exn(&v_2);
   return fx_status;
}

FX_EXTERN_C int
   _fx_M11C_gen_typesFM4NodeNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
   struct _fx_N12Map__color_t* arg0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t* arg1,
   struct _fx_R9Ast__id_t* arg2,
   struct _fx_R29C_gen_types__ctyp_temp_info_t* arg3,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t* arg4,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t);
   v->u.Node.t0 = *arg0;
   FX_COPY_PTR(arg1, &v->u.Node.t1);
   v->u.Node.t2 = *arg2;
   _fx_copy_R29C_gen_types__ctyp_temp_info_t(arg3, &v->u.Node.t3);
   FX_COPY_PTR(arg4, &v->u.Node.t4);
   return 0;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM5emptyRt6Map__t2R9Ast__id_tRM16ctyp_temp_info_t1FPi2R9Ast__id_tR9Ast__id_t(
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t* cmp_0,
   struct _fx_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   _fx_make_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(_fx_g18C_gen_types__Empty, cmp_0, fx_result);
   return fx_status;
}

FX_EXTERN_C int
   _fx_M11C_gen_typesFM8find_optNt6option1RM16ctyp_temp_info_t2Rt6Map__t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_t(
   struct _fx_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t* m_0,
   struct _fx_R9Ast__id_t* x_0,
   struct _fx_Nt6option1R29C_gen_types__ctyp_temp_info_t* fx_result,
   void* fx_fv)
{
   _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t v_0 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t v_1 = {0};
   _fx_Nt6option1R29C_gen_types__ctyp_temp_info_t result_0 = {0};
   _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t t_0 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_0 = {0};
   int fx_status = 0;
   FX_COPY_PTR(m_0->root, &v_0);
   FX_COPY_FP(&m_0->cmp, &v_1);
   FX_COPY_PTR(v_0, &t_0);
   _fx_R9Ast__id_t xk_0 = *x_0;
   FX_COPY_FP(&v_1, &cmp_0);
   for (;;) {
      _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t t_1 = 0;
      _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_1 = {0};
      FX_COPY_PTR(t_0, &t_1);
      _fx_R9Ast__id_t xk_1 = xk_0;
      FX_COPY_FP(&cmp_0, &cmp_1);
      if ((t_1 != 0) + 1 == 2) {
         _fx_Nt6option1R29C_gen_types__ctyp_temp_info_t result_1 = {0};
         _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t*
            vcase_0 = &t_1->u.Node;
         int_ c_0;
         FX_CALL(cmp_1.fp(&xk_1, &vcase_0->t2, &c_0, cmp_1.fcv), _fx_catch_0);
         if (c_0 < 0) {
            _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t* l_0 = &vcase_0->t1;
            _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&t_0);
            FX_COPY_PTR(*l_0, &t_0);
            xk_0 = xk_1;
            FX_FREE_FP(&cmp_0);
            FX_COPY_FP(&cmp_1, &cmp_0);
         }
         else if (c_0 > 0) {
            _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t* r_0 = &vcase_0->t4;
            _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&t_0);
            FX_COPY_PTR(*r_0, &t_0);
            xk_0 = xk_1;
            FX_FREE_FP(&cmp_0);
            FX_COPY_FP(&cmp_1, &cmp_0);
         }
         else {
            _fx_M11C_gen_typesFM4SomeNt6option1RM16ctyp_temp_info_t1RM16ctyp_temp_info_t(&vcase_0->t3, &result_1);
            _fx_free_Nt6option1R29C_gen_types__ctyp_temp_info_t(&result_0);
            _fx_copy_Nt6option1R29C_gen_types__ctyp_temp_info_t(&result_1, &result_0);
            FX_BREAK(_fx_catch_0);
         }

      _fx_catch_0: ;
         _fx_free_Nt6option1R29C_gen_types__ctyp_temp_info_t(&result_1);
      }
      else {
         _fx_free_Nt6option1R29C_gen_types__ctyp_temp_info_t(&result_0);
         _fx_copy_Nt6option1R29C_gen_types__ctyp_temp_info_t(&_fx_g17C_gen_types__None, &result_0);
         FX_BREAK(_fx_catch_1);

      _fx_catch_1: ;
      }
      FX_CHECK_EXN(_fx_catch_2);

   _fx_catch_2: ;
      FX_FREE_FP(&cmp_1);
      if (t_1) {
         _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&t_1);
      }
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   _fx_copy_Nt6option1R29C_gen_types__ctyp_temp_info_t(&result_0, fx_result);

_fx_cleanup: ;
   if (v_0) {
      _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&v_0);
   }
   FX_FREE_FP(&v_1);
   _fx_free_Nt6option1R29C_gen_types__ctyp_temp_info_t(&result_0);
   if (t_0) {
      _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&t_0);
   }
   FX_FREE_FP(&cmp_0);
   return fx_status;
}

FX_EXTERN_C int
   _fx_M11C_gen_typesFM12balance_leftNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t4Nt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t* l_0,
   struct _fx_R9Ast__id_t* xk_0,
   struct _fx_R29C_gen_types__ctyp_temp_info_t* xd_0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t* r_0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   if ((l_0 != 0) + 1 == 2) {
      _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t*
         vcase_0 = &l_0->u.Node;
      if (vcase_0->t0.tag == 1) {
         _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t v_0 = vcase_0->t1;
         if ((v_0 != 0) + 1 == 2) {
            _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t*
               vcase_1 = &v_0->u.Node;
            if (vcase_1->t0.tag == 1) {
               _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t v_1 = 0;
               _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t v_2 = 0;
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
                     &_fx_g18C_gen_types__Black, vcase_1->t1, &vcase_1->t2, &vcase_1->t3, vcase_1->t4, &v_1), _fx_catch_0);
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
                     &_fx_g18C_gen_types__Black, vcase_0->t4, xk_0, xd_0, r_0, &v_2), _fx_catch_0);
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
                     &_fx_g16C_gen_types__Red, v_1, &vcase_0->t2, &vcase_0->t3, v_2, fx_result), _fx_catch_0);

            _fx_catch_0: ;
               if (v_2) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&v_2);
               }
               if (v_1) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&v_1);
               }
               goto _fx_endmatch_0;
            }
         }
      }
   }
   if ((l_0 != 0) + 1 == 2) {
      _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t*
         vcase_2 = &l_0->u.Node;
      if (vcase_2->t0.tag == 1) {
         _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t v_3 = vcase_2->t4;
         if ((v_3 != 0) + 1 == 2) {
            _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t*
               vcase_3 = &v_3->u.Node;
            if (vcase_3->t0.tag == 1) {
               _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t v_4 = 0;
               _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t v_5 = 0;
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
                     &_fx_g18C_gen_types__Black, vcase_2->t1, &vcase_2->t2, &vcase_2->t3, vcase_3->t1, &v_4), _fx_catch_1);
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
                     &_fx_g18C_gen_types__Black, vcase_3->t4, xk_0, xd_0, r_0, &v_5), _fx_catch_1);
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
                     &_fx_g16C_gen_types__Red, v_4, &vcase_3->t2, &vcase_3->t3, v_5, fx_result), _fx_catch_1);

            _fx_catch_1: ;
               if (v_5) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&v_5);
               }
               if (v_4) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&v_4);
               }
               goto _fx_endmatch_0;
            }
         }
      }
   }
   FX_CALL(
      _fx_M11C_gen_typesFM4NodeNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
         &_fx_g18C_gen_types__Black, l_0, xk_0, xd_0, r_0, fx_result), _fx_catch_2);

_fx_catch_2: ;

_fx_endmatch_0: ;
   return fx_status;
}

FX_EXTERN_C int
   _fx_M11C_gen_typesFM13balance_rightNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t4Nt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t* l_0,
   struct _fx_R9Ast__id_t* xk_0,
   struct _fx_R29C_gen_types__ctyp_temp_info_t* xd_0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t* r_0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   if ((r_0 != 0) + 1 == 2) {
      _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t*
         vcase_0 = &r_0->u.Node;
      if (vcase_0->t0.tag == 1) {
         _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t v_0 = vcase_0->t1;
         if ((v_0 != 0) + 1 == 2) {
            _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t*
               vcase_1 = &v_0->u.Node;
            if (vcase_1->t0.tag == 1) {
               _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t v_1 = 0;
               _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t v_2 = 0;
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
                     &_fx_g18C_gen_types__Black, l_0, xk_0, xd_0, vcase_1->t1, &v_1), _fx_catch_0);
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
                     &_fx_g18C_gen_types__Black, vcase_1->t4, &vcase_0->t2, &vcase_0->t3, vcase_0->t4, &v_2), _fx_catch_0);
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
                     &_fx_g16C_gen_types__Red, v_1, &vcase_1->t2, &vcase_1->t3, v_2, fx_result), _fx_catch_0);

            _fx_catch_0: ;
               if (v_2) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&v_2);
               }
               if (v_1) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&v_1);
               }
               goto _fx_endmatch_0;
            }
         }
      }
   }
   if ((r_0 != 0) + 1 == 2) {
      _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t*
         vcase_2 = &r_0->u.Node;
      if (vcase_2->t0.tag == 1) {
         _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t v_3 = vcase_2->t4;
         if ((v_3 != 0) + 1 == 2) {
            _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t*
               vcase_3 = &v_3->u.Node;
            if (vcase_3->t0.tag == 1) {
               _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t v_4 = 0;
               _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t v_5 = 0;
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
                     &_fx_g18C_gen_types__Black, l_0, xk_0, xd_0, vcase_2->t1, &v_4), _fx_catch_1);
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
                     &_fx_g18C_gen_types__Black, vcase_3->t1, &vcase_3->t2, &vcase_3->t3, vcase_3->t4, &v_5), _fx_catch_1);
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
                     &_fx_g16C_gen_types__Red, v_4, &vcase_2->t2, &vcase_2->t3, v_5, fx_result), _fx_catch_1);

            _fx_catch_1: ;
               if (v_5) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&v_5);
               }
               if (v_4) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&v_4);
               }
               goto _fx_endmatch_0;
            }
         }
      }
   }
   FX_CALL(
      _fx_M11C_gen_typesFM4NodeNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
         &_fx_g18C_gen_types__Black, l_0, xk_0, xd_0, r_0, fx_result), _fx_catch_2);

_fx_catch_2: ;

_fx_endmatch_0: ;
   return fx_status;
}

FX_EXTERN_C int
   _fx_M11C_gen_typesFM12add_to_tree_Nt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t4Nt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tFPi2R9Ast__id_tR9Ast__id_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t* t_0,
   struct _fx_R9Ast__id_t* xk_0,
   struct _fx_R29C_gen_types__ctyp_temp_info_t* xd_0,
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t* cmp_0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   int tag_0 = (t_0 != 0) + 1;
   if (tag_0 == 2) {
      _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t*
         vcase_0 = &t_0->u.Node;
      if (vcase_0->t0.tag == 1) {
         _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t v_0 = 0;
         _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t v_1 = 0;
         _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t r_0 = vcase_0->t4;
         _fx_R29C_gen_types__ctyp_temp_info_t* yd_0 = &vcase_0->t3;
         _fx_R9Ast__id_t* yk_0 = &vcase_0->t2;
         _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t l_0 = vcase_0->t1;
         int_ c_0;
         FX_CALL(cmp_0->fp(xk_0, yk_0, &c_0, cmp_0->fcv), _fx_catch_0);
         if (c_0 < 0) {
            FX_CALL(
               _fx_M11C_gen_typesFM12add_to_tree_Nt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t4Nt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tFPi2R9Ast__id_tR9Ast__id_t(
                  l_0, xk_0, xd_0, cmp_0, &v_0, 0), _fx_catch_0);
            FX_CALL(
               _fx_M11C_gen_typesFM4NodeNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
                  &_fx_g16C_gen_types__Red, v_0, yk_0, yd_0, r_0, fx_result), _fx_catch_0);
         }
         else if (c_0 > 0) {
            FX_CALL(
               _fx_M11C_gen_typesFM12add_to_tree_Nt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t4Nt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tFPi2R9Ast__id_tR9Ast__id_t(
                  r_0, xk_0, xd_0, cmp_0, &v_1, 0), _fx_catch_0);
            FX_CALL(
               _fx_M11C_gen_typesFM4NodeNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
                  &_fx_g16C_gen_types__Red, l_0, yk_0, yd_0, v_1, fx_result), _fx_catch_0);
         }
         else {
            FX_CALL(
               _fx_M11C_gen_typesFM4NodeNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
                  &_fx_g16C_gen_types__Red, l_0, xk_0, xd_0, r_0, fx_result), _fx_catch_0);
         }

      _fx_catch_0: ;
         if (v_1) {
            _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&v_1);
         }
         if (v_0) {
            _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&v_0);
         }
         goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 2) {
      _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t*
         vcase_1 = &t_0->u.Node;
      if (vcase_1->t0.tag == 2) {
         _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t v_2 = 0;
         _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t v_3 = 0;
         _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t r_1 = vcase_1->t4;
         _fx_R29C_gen_types__ctyp_temp_info_t* yd_1 = &vcase_1->t3;
         _fx_R9Ast__id_t* yk_1 = &vcase_1->t2;
         _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t l_1 = vcase_1->t1;
         int_ c_1;
         FX_CALL(cmp_0->fp(xk_0, yk_1, &c_1, cmp_0->fcv), _fx_catch_1);
         if (c_1 < 0) {
            FX_CALL(
               _fx_M11C_gen_typesFM12add_to_tree_Nt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t4Nt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tFPi2R9Ast__id_tR9Ast__id_t(
                  l_1, xk_0, xd_0, cmp_0, &v_2, 0), _fx_catch_1);
            FX_CALL(
               _fx_M11C_gen_typesFM12balance_leftNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t4Nt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
                  v_2, yk_1, yd_1, r_1, fx_result, 0), _fx_catch_1);
         }
         else if (c_1 > 0) {
            FX_CALL(
               _fx_M11C_gen_typesFM12add_to_tree_Nt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t4Nt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tFPi2R9Ast__id_tR9Ast__id_t(
                  r_1, xk_0, xd_0, cmp_0, &v_3, 0), _fx_catch_1);
            FX_CALL(
               _fx_M11C_gen_typesFM13balance_rightNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t4Nt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
                  l_1, yk_1, yd_1, v_3, fx_result, 0), _fx_catch_1);
         }
         else {
            FX_CALL(
               _fx_M11C_gen_typesFM4NodeNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
                  &_fx_g18C_gen_types__Black, l_1, xk_0, xd_0, r_1, fx_result), _fx_catch_1);
         }

      _fx_catch_1: ;
         if (v_3) {
            _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&v_3);
         }
         if (v_2) {
            _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&v_2);
         }
         goto _fx_endmatch_0;
      }
   }
   FX_CALL(
      _fx_M11C_gen_typesFM4NodeNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
         &_fx_g16C_gen_types__Red, _fx_g18C_gen_types__Empty, xk_0, xd_0, _fx_g18C_gen_types__Empty, fx_result), _fx_catch_2);

_fx_catch_2: ;

_fx_endmatch_0: ;

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int
   _fx_M11C_gen_typesFM3addRt6Map__t2R9Ast__id_tRM16ctyp_temp_info_t3Rt6Map__t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_t(
   struct _fx_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t* m_0,
   struct _fx_R9Ast__id_t* xk_0,
   struct _fx_R29C_gen_types__ctyp_temp_info_t* xd_0,
   struct _fx_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t* fx_result,
   void* fx_fv)
{
   _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t v_0 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t v_1 = {0};
   _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t v_2 = 0;
   _fx_T2Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tB v_3 = {0};
   _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t new_root_0 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t v_4 = {0};
   int fx_status = 0;
   FX_COPY_PTR(m_0->root, &v_0);
   FX_COPY_FP(&m_0->cmp, &v_1);
   FX_CALL(
      _fx_M11C_gen_typesFM12add_to_tree_Nt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t4Nt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tFPi2R9Ast__id_tR9Ast__id_t(
         v_0, xk_0, xd_0, &v_1, &v_2, 0), _fx_cleanup);
   if ((v_2 != 0) + 1 == 2) {
      _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t*
         vcase_0 = &v_2->u.Node;
      if (vcase_0->t0.tag == 1) {
         _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t v_5 = 0;
         FX_CALL(
            _fx_M11C_gen_typesFM4NodeNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tRM16ctyp_temp_info_t(
               &_fx_g18C_gen_types__Black, vcase_0->t1, &vcase_0->t2, &vcase_0->t3, vcase_0->t4, &v_5), _fx_catch_0);
         _fx_make_T2Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tB(v_5, false, &v_3);

      _fx_catch_0: ;
         if (v_5) {
            _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&v_5);
         }
         goto _fx_endmatch_0;
      }
   }
   _fx_make_T2Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tB(v_2, true, &v_3);

_fx_endmatch_0: ;
   FX_CHECK_EXN(_fx_cleanup);
   FX_COPY_PTR(v_3.t0, &new_root_0);
   FX_COPY_FP(&m_0->cmp, &v_4);
   _fx_make_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(new_root_0, &v_4, fx_result);

_fx_cleanup: ;
   if (v_0) {
      _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&v_0);
   }
   FX_FREE_FP(&v_1);
   if (v_2) {
      _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&v_2);
   }
   _fx_free_T2Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tB(&v_3);
   if (new_root_0) {
      _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&new_root_0);
   }
   FX_FREE_FP(&v_4);
   return fx_status;
}

FX_EXTERN_C int
   _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
   struct _fx_N12Set__color_t* arg0,
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* arg1,
   struct _fx_R9Ast__id_t* arg2,
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* arg3,
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt11Set__tree_t1R9Ast__id_t);
   v->u.Node.t0 = *arg0;
   FX_COPY_PTR(arg1, &v->u.Node.t1);
   v->u.Node.t2 = *arg2;
   FX_COPY_PTR(arg3, &v->u.Node.t3);
   return 0;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM3memB2Rt6Set__t1R9Ast__id_tR9Ast__id_t(
   struct _fx_Rt6Set__t1R9Ast__id_t* s_0,
   struct _fx_R9Ast__id_t* x_0,
   bool* fx_result,
   void* fx_fv)
{
   _fx_Nt11Set__tree_t1R9Ast__id_t v_0 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t v_1 = {0};
   _fx_Nt11Set__tree_t1R9Ast__id_t t_0 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_0 = {0};
   int fx_status = 0;
   FX_COPY_PTR(s_0->root, &v_0);
   FX_COPY_FP(&s_0->cmp, &v_1);
   bool result_0 = 0;
   FX_COPY_PTR(v_0, &t_0);
   _fx_R9Ast__id_t x_1 = *x_0;
   FX_COPY_FP(&v_1, &cmp_0);
   for (;;) {
      _fx_Nt11Set__tree_t1R9Ast__id_t t_1 = 0;
      _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_1 = {0};
      FX_COPY_PTR(t_0, &t_1);
      _fx_R9Ast__id_t x_2 = x_1;
      FX_COPY_FP(&cmp_0, &cmp_1);
      if ((t_1 != 0) + 1 == 2) {
         _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* vcase_0 = &t_1->u.Node;
         int_ c_0;
         FX_CALL(cmp_1.fp(&x_2, &vcase_0->t2, &c_0, cmp_1.fcv), _fx_catch_0);
         if (c_0 < 0) {
            _fx_Nt11Set__tree_t1R9Ast__id_t* l_0 = &vcase_0->t1;
            _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_0);
            FX_COPY_PTR(*l_0, &t_0);
            x_1 = x_2;
            FX_FREE_FP(&cmp_0);
            FX_COPY_FP(&cmp_1, &cmp_0);
         }
         else if (c_0 > 0) {
            _fx_Nt11Set__tree_t1R9Ast__id_t* r_0 = &vcase_0->t3;
            _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_0);
            FX_COPY_PTR(*r_0, &t_0);
            x_1 = x_2;
            FX_FREE_FP(&cmp_0);
            FX_COPY_FP(&cmp_1, &cmp_0);
         }
         else {
            result_0 = true; FX_BREAK(_fx_catch_0);
         }

      _fx_catch_0: ;
      }
      else {
         result_0 = false; FX_BREAK(_fx_catch_1);  _fx_catch_1: ;
      }
      FX_CHECK_EXN(_fx_catch_2);

   _fx_catch_2: ;
      FX_FREE_FP(&cmp_1);
      if (t_1) {
         _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_1);
      }
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   *fx_result = result_0;

_fx_cleanup: ;
   if (v_0) {
      _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_0);
   }
   FX_FREE_FP(&v_1);
   if (t_0) {
      _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_0);
   }
   FX_FREE_FP(&cmp_0);
   return fx_status;
}

FX_EXTERN_C int
   _fx_M11C_gen_typesFM12balance_leftNt11Set__tree_t1R9Ast__id_t3Nt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* l_0,
   struct _fx_R9Ast__id_t* x_0,
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* r_0,
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   if ((l_0 != 0) + 1 == 2) {
      _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* vcase_0 = &l_0->u.Node;
      if (vcase_0->t0.tag == 1) {
         _fx_Nt11Set__tree_t1R9Ast__id_t v_0 = vcase_0->t1;
         if ((v_0 != 0) + 1 == 2) {
            _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* vcase_1 = &v_0->u.Node;
            if (vcase_1->t0.tag == 1) {
               _fx_Nt11Set__tree_t1R9Ast__id_t v_1 = 0;
               _fx_Nt11Set__tree_t1R9Ast__id_t v_2 = 0;
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
                     &_fx_g20C_gen_types__Black1_, vcase_1->t1, &vcase_1->t2, vcase_1->t3, &v_1), _fx_catch_0);
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
                     &_fx_g20C_gen_types__Black1_, vcase_0->t3, x_0, r_0, &v_2), _fx_catch_0);
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
                     &_fx_g18C_gen_types__Red1_, v_1, &vcase_0->t2, v_2, fx_result), _fx_catch_0);

            _fx_catch_0: ;
               if (v_2) {
                  _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_2);
               }
               if (v_1) {
                  _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_1);
               }
               goto _fx_endmatch_0;
            }
         }
      }
   }
   if ((l_0 != 0) + 1 == 2) {
      _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* vcase_2 = &l_0->u.Node;
      if (vcase_2->t0.tag == 1) {
         _fx_Nt11Set__tree_t1R9Ast__id_t v_3 = vcase_2->t3;
         if ((v_3 != 0) + 1 == 2) {
            _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* vcase_3 = &v_3->u.Node;
            if (vcase_3->t0.tag == 1) {
               _fx_Nt11Set__tree_t1R9Ast__id_t v_4 = 0;
               _fx_Nt11Set__tree_t1R9Ast__id_t v_5 = 0;
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
                     &_fx_g20C_gen_types__Black1_, vcase_2->t1, &vcase_2->t2, vcase_3->t1, &v_4), _fx_catch_1);
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
                     &_fx_g20C_gen_types__Black1_, vcase_3->t3, x_0, r_0, &v_5), _fx_catch_1);
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
                     &_fx_g18C_gen_types__Red1_, v_4, &vcase_3->t2, v_5, fx_result), _fx_catch_1);

            _fx_catch_1: ;
               if (v_5) {
                  _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_5);
               }
               if (v_4) {
                  _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_4);
               }
               goto _fx_endmatch_0;
            }
         }
      }
   }
   FX_CALL(
      _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
         &_fx_g20C_gen_types__Black1_, l_0, x_0, r_0, fx_result), _fx_catch_2);

_fx_catch_2: ;

_fx_endmatch_0: ;
   return fx_status;
}

FX_EXTERN_C int
   _fx_M11C_gen_typesFM13balance_rightNt11Set__tree_t1R9Ast__id_t3Nt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* l_0,
   struct _fx_R9Ast__id_t* x_0,
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* r_0,
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   if ((r_0 != 0) + 1 == 2) {
      _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* vcase_0 = &r_0->u.Node;
      if (vcase_0->t0.tag == 1) {
         _fx_Nt11Set__tree_t1R9Ast__id_t v_0 = vcase_0->t1;
         if ((v_0 != 0) + 1 == 2) {
            _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* vcase_1 = &v_0->u.Node;
            if (vcase_1->t0.tag == 1) {
               _fx_Nt11Set__tree_t1R9Ast__id_t v_1 = 0;
               _fx_Nt11Set__tree_t1R9Ast__id_t v_2 = 0;
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
                     &_fx_g20C_gen_types__Black1_, l_0, x_0, vcase_1->t1, &v_1), _fx_catch_0);
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
                     &_fx_g20C_gen_types__Black1_, vcase_1->t3, &vcase_0->t2, vcase_0->t3, &v_2), _fx_catch_0);
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
                     &_fx_g18C_gen_types__Red1_, v_1, &vcase_1->t2, v_2, fx_result), _fx_catch_0);

            _fx_catch_0: ;
               if (v_2) {
                  _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_2);
               }
               if (v_1) {
                  _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_1);
               }
               goto _fx_endmatch_0;
            }
         }
      }
   }
   if ((r_0 != 0) + 1 == 2) {
      _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* vcase_2 = &r_0->u.Node;
      if (vcase_2->t0.tag == 1) {
         _fx_Nt11Set__tree_t1R9Ast__id_t v_3 = vcase_2->t3;
         if ((v_3 != 0) + 1 == 2) {
            _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* vcase_3 = &v_3->u.Node;
            if (vcase_3->t0.tag == 1) {
               _fx_Nt11Set__tree_t1R9Ast__id_t v_4 = 0;
               _fx_Nt11Set__tree_t1R9Ast__id_t v_5 = 0;
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
                     &_fx_g20C_gen_types__Black1_, l_0, x_0, vcase_2->t1, &v_4), _fx_catch_1);
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
                     &_fx_g20C_gen_types__Black1_, vcase_3->t1, &vcase_3->t2, vcase_3->t3, &v_5), _fx_catch_1);
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
                     &_fx_g18C_gen_types__Red1_, v_4, &vcase_2->t2, v_5, fx_result), _fx_catch_1);

            _fx_catch_1: ;
               if (v_5) {
                  _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_5);
               }
               if (v_4) {
                  _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_4);
               }
               goto _fx_endmatch_0;
            }
         }
      }
   }
   FX_CALL(
      _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
         &_fx_g20C_gen_types__Black1_, l_0, x_0, r_0, fx_result), _fx_catch_2);

_fx_catch_2: ;

_fx_endmatch_0: ;
   return fx_status;
}

FX_EXTERN_C int
   _fx_M11C_gen_typesFM12add_to_tree_T2Nt11Set__tree_t1R9Ast__id_ti3Nt11Set__tree_t1R9Ast__id_tR9Ast__id_tFPi2R9Ast__id_tR9Ast__id_t(
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* t_0,
   struct _fx_R9Ast__id_t* x_0,
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t* cmp_0,
   struct _fx_T2Nt11Set__tree_t1R9Ast__id_ti* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   int tag_0 = (t_0 != 0) + 1;
   if (tag_0 == 2) {
      _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* vcase_0 = &t_0->u.Node;
      if (vcase_0->t0.tag == 1) {
         _fx_T2Nt11Set__tree_t1R9Ast__id_ti v_0 = {0};
         _fx_Nt11Set__tree_t1R9Ast__id_t l_0 = 0;
         _fx_Nt11Set__tree_t1R9Ast__id_t v_1 = 0;
         _fx_T2Nt11Set__tree_t1R9Ast__id_ti v_2 = {0};
         _fx_Nt11Set__tree_t1R9Ast__id_t r_0 = 0;
         _fx_Nt11Set__tree_t1R9Ast__id_t v_3 = 0;
         _fx_Nt11Set__tree_t1R9Ast__id_t r_1 = vcase_0->t3;
         _fx_R9Ast__id_t* y_0 = &vcase_0->t2;
         _fx_Nt11Set__tree_t1R9Ast__id_t l_1 = vcase_0->t1;
         int_ c_0;
         FX_CALL(cmp_0->fp(x_0, y_0, &c_0, cmp_0->fcv), _fx_catch_0);
         if (c_0 < 0) {
            FX_CALL(
               _fx_M11C_gen_typesFM12add_to_tree_T2Nt11Set__tree_t1R9Ast__id_ti3Nt11Set__tree_t1R9Ast__id_tR9Ast__id_tFPi2R9Ast__id_tR9Ast__id_t(
                  l_1, x_0, cmp_0, &v_0, 0), _fx_catch_0);
            FX_COPY_PTR(v_0.t0, &l_0);
            int_ dsz_0 = v_0.t1;
            FX_CALL(
               _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
                  &_fx_g18C_gen_types__Red1_, l_0, y_0, r_1, &v_1), _fx_catch_0);
            _fx_make_T2Nt11Set__tree_t1R9Ast__id_ti(v_1, dsz_0, fx_result);
         }
         else if (c_0 > 0) {
            FX_CALL(
               _fx_M11C_gen_typesFM12add_to_tree_T2Nt11Set__tree_t1R9Ast__id_ti3Nt11Set__tree_t1R9Ast__id_tR9Ast__id_tFPi2R9Ast__id_tR9Ast__id_t(
                  r_1, x_0, cmp_0, &v_2, 0), _fx_catch_0);
            FX_COPY_PTR(v_2.t0, &r_0);
            int_ dsz_1 = v_2.t1;
            FX_CALL(
               _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
                  &_fx_g18C_gen_types__Red1_, l_1, y_0, r_0, &v_3), _fx_catch_0);
            _fx_make_T2Nt11Set__tree_t1R9Ast__id_ti(v_3, dsz_1, fx_result);
         }
         else {
            _fx_make_T2Nt11Set__tree_t1R9Ast__id_ti(t_0, 0, fx_result);
         }

      _fx_catch_0: ;
         if (v_3) {
            _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_3);
         }
         if (r_0) {
            _fx_free_Nt11Set__tree_t1R9Ast__id_t(&r_0);
         }
         _fx_free_T2Nt11Set__tree_t1R9Ast__id_ti(&v_2);
         if (v_1) {
            _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_1);
         }
         if (l_0) {
            _fx_free_Nt11Set__tree_t1R9Ast__id_t(&l_0);
         }
         _fx_free_T2Nt11Set__tree_t1R9Ast__id_ti(&v_0);
         goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 2) {
      _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* vcase_1 = &t_0->u.Node;
      if (vcase_1->t0.tag == 2) {
         _fx_T2Nt11Set__tree_t1R9Ast__id_ti v_4 = {0};
         _fx_Nt11Set__tree_t1R9Ast__id_t l_2 = 0;
         _fx_Nt11Set__tree_t1R9Ast__id_t v_5 = 0;
         _fx_T2Nt11Set__tree_t1R9Ast__id_ti v_6 = {0};
         _fx_Nt11Set__tree_t1R9Ast__id_t r_2 = 0;
         _fx_Nt11Set__tree_t1R9Ast__id_t v_7 = 0;
         _fx_Nt11Set__tree_t1R9Ast__id_t r_3 = vcase_1->t3;
         _fx_R9Ast__id_t* y_1 = &vcase_1->t2;
         _fx_Nt11Set__tree_t1R9Ast__id_t l_3 = vcase_1->t1;
         int_ c_1;
         FX_CALL(cmp_0->fp(x_0, y_1, &c_1, cmp_0->fcv), _fx_catch_1);
         if (c_1 < 0) {
            FX_CALL(
               _fx_M11C_gen_typesFM12add_to_tree_T2Nt11Set__tree_t1R9Ast__id_ti3Nt11Set__tree_t1R9Ast__id_tR9Ast__id_tFPi2R9Ast__id_tR9Ast__id_t(
                  l_3, x_0, cmp_0, &v_4, 0), _fx_catch_1);
            FX_COPY_PTR(v_4.t0, &l_2);
            int_ dsz_2 = v_4.t1;
            if (dsz_2 > 0) {
               FX_CALL(
                  _fx_M11C_gen_typesFM12balance_leftNt11Set__tree_t1R9Ast__id_t3Nt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
                     l_2, y_1, r_3, &v_5, 0), _fx_catch_1);
            }
            else {
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
                     &_fx_g20C_gen_types__Black1_, l_2, y_1, r_3, &v_5), _fx_catch_1);
            }
            _fx_make_T2Nt11Set__tree_t1R9Ast__id_ti(v_5, dsz_2, fx_result);
         }
         else if (c_1 > 0) {
            FX_CALL(
               _fx_M11C_gen_typesFM12add_to_tree_T2Nt11Set__tree_t1R9Ast__id_ti3Nt11Set__tree_t1R9Ast__id_tR9Ast__id_tFPi2R9Ast__id_tR9Ast__id_t(
                  r_3, x_0, cmp_0, &v_6, 0), _fx_catch_1);
            FX_COPY_PTR(v_6.t0, &r_2);
            int_ dsz_3 = v_6.t1;
            if (dsz_3 > 0) {
               FX_CALL(
                  _fx_M11C_gen_typesFM13balance_rightNt11Set__tree_t1R9Ast__id_t3Nt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
                     l_3, y_1, r_2, &v_7, 0), _fx_catch_1);
            }
            else {
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
                     &_fx_g20C_gen_types__Black1_, l_3, y_1, r_2, &v_7), _fx_catch_1);
            }
            _fx_make_T2Nt11Set__tree_t1R9Ast__id_ti(v_7, dsz_3, fx_result);
         }
         else {
            _fx_make_T2Nt11Set__tree_t1R9Ast__id_ti(t_0, 0, fx_result);
         }

      _fx_catch_1: ;
         if (v_7) {
            _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_7);
         }
         if (r_2) {
            _fx_free_Nt11Set__tree_t1R9Ast__id_t(&r_2);
         }
         _fx_free_T2Nt11Set__tree_t1R9Ast__id_ti(&v_6);
         if (v_5) {
            _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_5);
         }
         if (l_2) {
            _fx_free_Nt11Set__tree_t1R9Ast__id_t(&l_2);
         }
         _fx_free_T2Nt11Set__tree_t1R9Ast__id_ti(&v_4);
         goto _fx_endmatch_0;
      }
   }
   _fx_Nt11Set__tree_t1R9Ast__id_t v_8 = 0;
   FX_CALL(
      _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
         &_fx_g18C_gen_types__Red1_, _fx_g20C_gen_types__Empty1_, x_0, _fx_g20C_gen_types__Empty1_, &v_8), _fx_catch_2);
   _fx_make_T2Nt11Set__tree_t1R9Ast__id_ti(v_8, 1, fx_result);

_fx_catch_2: ;
   if (v_8) {
      _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_8);
   }

_fx_endmatch_0: ;

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM3addRt6Set__t1R9Ast__id_t2Rt6Set__t1R9Ast__id_tR9Ast__id_t(
   struct _fx_Rt6Set__t1R9Ast__id_t* s_0,
   struct _fx_R9Ast__id_t* x_0,
   struct _fx_Rt6Set__t1R9Ast__id_t* fx_result,
   void* fx_fv)
{
   _fx_Nt11Set__tree_t1R9Ast__id_t v_0 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t v_1 = {0};
   _fx_T2Nt11Set__tree_t1R9Ast__id_ti v_2 = {0};
   _fx_Nt11Set__tree_t1R9Ast__id_t t_0 = 0;
   _fx_T2Nt11Set__tree_t1R9Ast__id_tB v_3 = {0};
   _fx_Nt11Set__tree_t1R9Ast__id_t t_1 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t v_4 = {0};
   int fx_status = 0;
   FX_COPY_PTR(s_0->root, &v_0);
   FX_COPY_FP(&s_0->cmp, &v_1);
   FX_CALL(
      _fx_M11C_gen_typesFM12add_to_tree_T2Nt11Set__tree_t1R9Ast__id_ti3Nt11Set__tree_t1R9Ast__id_tR9Ast__id_tFPi2R9Ast__id_tR9Ast__id_t(
         v_0, x_0, &v_1, &v_2, 0), _fx_cleanup);
   FX_COPY_PTR(v_2.t0, &t_0);
   int_ dsz_0 = v_2.t1;
   if ((t_0 != 0) + 1 == 2) {
      _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* vcase_0 = &t_0->u.Node;
      if (vcase_0->t0.tag == 1) {
         _fx_Nt11Set__tree_t1R9Ast__id_t v_5 = 0;
         FX_CALL(
            _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
               &_fx_g20C_gen_types__Black1_, vcase_0->t1, &vcase_0->t2, vcase_0->t3, &v_5), _fx_catch_0);
         _fx_make_T2Nt11Set__tree_t1R9Ast__id_tB(v_5, false, &v_3);

      _fx_catch_0: ;
         if (v_5) {
            _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_5);
         }
         goto _fx_endmatch_0;
      }
   }
   _fx_make_T2Nt11Set__tree_t1R9Ast__id_tB(t_0, true, &v_3);

_fx_endmatch_0: ;
   FX_CHECK_EXN(_fx_cleanup);
   FX_COPY_PTR(v_3.t0, &t_1);
   FX_COPY_FP(&s_0->cmp, &v_4);
   _fx_make_Rt6Set__t1R9Ast__id_t(t_1, s_0->size + dsz_0, &v_4, fx_result);

_fx_cleanup: ;
   if (v_0) {
      _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_0);
   }
   FX_FREE_FP(&v_1);
   _fx_free_T2Nt11Set__tree_t1R9Ast__id_ti(&v_2);
   if (t_0) {
      _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_0);
   }
   _fx_free_T2Nt11Set__tree_t1R9Ast__id_tB(&v_3);
   if (t_1) {
      _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_1);
   }
   FX_FREE_FP(&v_4);
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM4app_v2Nt11Set__tree_t1R9Ast__id_tFPv1R9Ast__id_t(
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* t_0,
   struct _fx_FPv1R9Ast__id_t* f_0,
   void* fx_fv)
{
   _fx_Nt11Set__tree_t1R9Ast__id_t t_1 = 0;
   _fx_FPv1R9Ast__id_t f_1 = {0};
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   FX_COPY_PTR(t_0, &t_1);
   FX_COPY_FP(f_0, &f_1);
   for (;;) {
      _fx_Nt11Set__tree_t1R9Ast__id_t t_2 = 0;
      _fx_FPv1R9Ast__id_t f_2 = {0};
      FX_COPY_PTR(t_1, &t_2);
      FX_COPY_FP(&f_1, &f_2);
      if ((t_2 != 0) + 1 == 2) {
         _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* vcase_0 = &t_2->u.Node;
         FX_CALL(_fx_M11C_gen_typesFM4app_v2Nt11Set__tree_t1R9Ast__id_tFPv1R9Ast__id_t(vcase_0->t1, &f_2, 0), _fx_catch_0);
         FX_CALL(f_2.fp(&vcase_0->t2, f_2.fcv), _fx_catch_0);
         _fx_Nt11Set__tree_t1R9Ast__id_t* r_0 = &vcase_0->t3;
         _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_1);
         FX_COPY_PTR(*r_0, &t_1);
         FX_FREE_FP(&f_1);
         FX_COPY_FP(&f_2, &f_1);

      _fx_catch_0: ;
      }
      else {
         FX_BREAK(_fx_catch_1);  _fx_catch_1: ;
      }
      FX_CHECK_EXN(_fx_catch_2);

   _fx_catch_2: ;
      FX_FREE_FP(&f_2);
      if (t_2) {
         _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_2);
      }
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }

_fx_cleanup: ;
   if (t_1) {
      _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_1);
   }
   FX_FREE_FP(&f_1);
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM3appv2Rt6Set__t1R9Ast__id_tFPv1R9Ast__id_t(
   struct _fx_Rt6Set__t1R9Ast__id_t* s_0,
   struct _fx_FPv1R9Ast__id_t* f_0,
   void* fx_fv)
{
   _fx_Nt11Set__tree_t1R9Ast__id_t v_0 = 0;
   int fx_status = 0;
   FX_COPY_PTR(s_0->root, &v_0);
   FX_CALL(_fx_M11C_gen_typesFM4app_v2Nt11Set__tree_t1R9Ast__id_tFPv1R9Ast__id_t(v_0, f_0, 0), _fx_cleanup);

_fx_cleanup: ;
   if (v_0) {
      _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_0);
   }
   return fx_status;
}

FX_EXTERN_C int
   _fx_M11C_gen_typesFM7filter_Rt6Set__t1R9Ast__id_t3Nt11Set__tree_t1R9Ast__id_tFPB1R9Ast__id_tRt6Set__t1R9Ast__id_t(
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* t_0,
   struct _fx_FPB1R9Ast__id_t* f_0,
   struct _fx_Rt6Set__t1R9Ast__id_t* res_0,
   struct _fx_Rt6Set__t1R9Ast__id_t* fx_result,
   void* fx_fv)
{
   _fx_Rt6Set__t1R9Ast__id_t result_0 = {0};
   _fx_Nt11Set__tree_t1R9Ast__id_t t_1 = 0;
   _fx_FPB1R9Ast__id_t f_1 = {0};
   _fx_Rt6Set__t1R9Ast__id_t res_1 = {0};
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   FX_COPY_PTR(t_0, &t_1);
   FX_COPY_FP(f_0, &f_1);
   _fx_copy_Rt6Set__t1R9Ast__id_t(res_0, &res_1);
   for (;;) {
      _fx_Nt11Set__tree_t1R9Ast__id_t t_2 = 0;
      _fx_FPB1R9Ast__id_t f_2 = {0};
      _fx_Rt6Set__t1R9Ast__id_t res_2 = {0};
      FX_COPY_PTR(t_1, &t_2);
      FX_COPY_FP(&f_1, &f_2);
      _fx_copy_Rt6Set__t1R9Ast__id_t(&res_1, &res_2);
      if ((t_2 != 0) + 1 == 2) {
         _fx_Rt6Set__t1R9Ast__id_t res_3 = {0};
         _fx_Rt6Set__t1R9Ast__id_t res_4 = {0};
         _fx_Nt11Set__tree_t1R9Ast__id_t v_0 = 0;
         _fx_FPi2R9Ast__id_tR9Ast__id_t v_1 = {0};
         _fx_T2Nt11Set__tree_t1R9Ast__id_ti v_2 = {0};
         _fx_Nt11Set__tree_t1R9Ast__id_t t_3 = 0;
         _fx_T2Nt11Set__tree_t1R9Ast__id_tB v_3 = {0};
         _fx_Nt11Set__tree_t1R9Ast__id_t t_4 = 0;
         _fx_FPi2R9Ast__id_tR9Ast__id_t v_4 = {0};
         _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* vcase_0 = &t_2->u.Node;
         _fx_R9Ast__id_t* x_0 = &vcase_0->t2;
         FX_CALL(
            _fx_M11C_gen_typesFM7filter_Rt6Set__t1R9Ast__id_t3Nt11Set__tree_t1R9Ast__id_tFPB1R9Ast__id_tRt6Set__t1R9Ast__id_t(
               vcase_0->t1, &f_2, &res_2, &res_3, 0), _fx_catch_1);
         bool v_5;
         FX_CALL(f_2.fp(x_0, &v_5, f_2.fcv), _fx_catch_1);
         if (v_5) {
            FX_COPY_PTR(res_3.root, &v_0);
            FX_COPY_FP(&res_3.cmp, &v_1);
            FX_CALL(
               _fx_M11C_gen_typesFM12add_to_tree_T2Nt11Set__tree_t1R9Ast__id_ti3Nt11Set__tree_t1R9Ast__id_tR9Ast__id_tFPi2R9Ast__id_tR9Ast__id_t(
                  v_0, x_0, &v_1, &v_2, 0), _fx_catch_1);
            FX_COPY_PTR(v_2.t0, &t_3);
            int_ dsz_0 = v_2.t1;
            if ((t_3 != 0) + 1 == 2) {
               _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* vcase_1 = &t_3->u.Node;
               if (vcase_1->t0.tag == 1) {
                  _fx_Nt11Set__tree_t1R9Ast__id_t v_6 = 0;
                  FX_CALL(
                     _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
                        &_fx_g20C_gen_types__Black1_, vcase_1->t1, &vcase_1->t2, vcase_1->t3, &v_6), _fx_catch_0);
                  _fx_make_T2Nt11Set__tree_t1R9Ast__id_tB(v_6, false, &v_3);

               _fx_catch_0: ;
                  if (v_6) {
                     _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_6);
                  }
                  goto _fx_endmatch_0;
               }
            }
            _fx_make_T2Nt11Set__tree_t1R9Ast__id_tB(t_3, true, &v_3);

         _fx_endmatch_0: ;
            FX_CHECK_EXN(_fx_catch_1);
            FX_COPY_PTR(v_3.t0, &t_4);
            FX_COPY_FP(&res_3.cmp, &v_4);
            _fx_make_Rt6Set__t1R9Ast__id_t(t_4, res_3.size + dsz_0, &v_4, &res_4);
         }
         else {
            _fx_copy_Rt6Set__t1R9Ast__id_t(&res_3, &res_4);
         }
         _fx_Nt11Set__tree_t1R9Ast__id_t* r_0 = &vcase_0->t3;
         _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_1);
         FX_COPY_PTR(*r_0, &t_1);
         FX_FREE_FP(&f_1);
         FX_COPY_FP(&f_2, &f_1);
         _fx_free_Rt6Set__t1R9Ast__id_t(&res_1);
         _fx_copy_Rt6Set__t1R9Ast__id_t(&res_4, &res_1);

      _fx_catch_1: ;
         FX_FREE_FP(&v_4);
         if (t_4) {
            _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_4);
         }
         _fx_free_T2Nt11Set__tree_t1R9Ast__id_tB(&v_3);
         if (t_3) {
            _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_3);
         }
         _fx_free_T2Nt11Set__tree_t1R9Ast__id_ti(&v_2);
         FX_FREE_FP(&v_1);
         if (v_0) {
            _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_0);
         }
         _fx_free_Rt6Set__t1R9Ast__id_t(&res_4);
         _fx_free_Rt6Set__t1R9Ast__id_t(&res_3);
      }
      else {
         _fx_free_Rt6Set__t1R9Ast__id_t(&result_0);
         _fx_copy_Rt6Set__t1R9Ast__id_t(&res_2, &result_0);
         FX_BREAK(_fx_catch_2);

      _fx_catch_2: ;
      }
      FX_CHECK_EXN(_fx_catch_3);

   _fx_catch_3: ;
      _fx_free_Rt6Set__t1R9Ast__id_t(&res_2);
      FX_FREE_FP(&f_2);
      if (t_2) {
         _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_2);
      }
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   _fx_copy_Rt6Set__t1R9Ast__id_t(&result_0, fx_result);

_fx_cleanup: ;
   _fx_free_Rt6Set__t1R9Ast__id_t(&result_0);
   if (t_1) {
      _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_1);
   }
   FX_FREE_FP(&f_1);
   _fx_free_Rt6Set__t1R9Ast__id_t(&res_1);
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM6filterRt6Set__t1R9Ast__id_t2Rt6Set__t1R9Ast__id_tFPB1R9Ast__id_t(
   struct _fx_Rt6Set__t1R9Ast__id_t* s_0,
   struct _fx_FPB1R9Ast__id_t* f_0,
   struct _fx_Rt6Set__t1R9Ast__id_t* fx_result,
   void* fx_fv)
{
   _fx_Nt11Set__tree_t1R9Ast__id_t v_0 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t v_1 = {0};
   _fx_Rt6Set__t1R9Ast__id_t v_2 = {0};
   int fx_status = 0;
   FX_COPY_PTR(s_0->root, &v_0);
   FX_COPY_FP(&s_0->cmp, &v_1);
   _fx_make_Rt6Set__t1R9Ast__id_t(_fx_g20C_gen_types__Empty1_, 0, &v_1, &v_2);
   FX_CALL(
      _fx_M11C_gen_typesFM7filter_Rt6Set__t1R9Ast__id_t3Nt11Set__tree_t1R9Ast__id_tFPB1R9Ast__id_tRt6Set__t1R9Ast__id_t(v_0,
         f_0, &v_2, fx_result, 0), _fx_cleanup);

_fx_cleanup: ;
   if (v_0) {
      _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_0);
   }
   FX_FREE_FP(&v_1);
   _fx_free_Rt6Set__t1R9Ast__id_t(&v_2);
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM15ktyp2ctyp_fargsLN14C_form__ctyp_t3LN14K_form__ktyp_tN14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_LN14K_form__ktyp_t_data_t* args_0,
   struct _fx_N14K_form__ktyp_t_data_t* rt_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_LN14C_form__ctyp_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_LN14C_form__ctyp_t args__0 = 0;
   _fx_LN14C_form__ctyp_t rct_0 = 0;
   _fx_N14C_form__ctyp_t v_0 = 0;
   _fx_N14C_form__ctyp_t v_1 = 0;
   _fx_LN14C_form__ctyp_t v_2 = 0;
   _fx_LN14C_form__ctyp_t v_3 = 0;
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   _fx_LN14C_form__ctyp_t lstend_0 = 0;
   _fx_LN14K_form__ktyp_t lst_0 = args_0;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_N14C_form__ctyp_t ctyp_0 = 0;
      _fx_N14K_form__ktyp_t v_4 = 0;
      _fx_LN19C_form__ctyp_attr_t ptr_attr_0 = 0;
      _fx_N14C_form__ctyp_t t_0 = 0;
      _fx_N14K_form__ktyp_t kt_0 = lst_0->hd;
      FX_CALL(_fx_M11C_gen_typesFM9ktyp2ctypN14C_form__ctyp_t2N14K_form__ktyp_tR10Ast__loc_t(kt_0, loc_0, &ctyp_0, 0),
         _fx_catch_1);
      _fx_R17K_form__ktprops_t v_5;
      FX_CALL(_fx_M10K_annotateFM11get_ktpropsR17K_form__ktprops_t2N14K_form__ktyp_tR10Ast__loc_t(kt_0, loc_0, &v_5, 0),
         _fx_catch_1);
      bool ktp_pass_by_ref_0 = v_5.ktp_pass_by_ref;
      FX_CALL(_fx_M6K_formFM10deref_ktypN14K_form__ktyp_t2N14K_form__ktyp_tR10Ast__loc_t(kt_0, loc_0, &v_4, 0), _fx_catch_1);
      if (FX_REC_VARIANT_TAG(v_4) != 17) {
         FX_CALL(_fx_cons_LN19C_form__ctyp_attr_t(&_fx_g22C_gen_types__CTypConst, 0, true, &ptr_attr_0), _fx_catch_0);

      _fx_catch_0: ;
      }
      FX_CHECK_EXN(_fx_catch_1);
      if (ktp_pass_by_ref_0) {
         FX_CALL(_fx_M6C_formFM10CTypRawPtrN14C_form__ctyp_t2LN19C_form__ctyp_attr_tN14C_form__ctyp_t(ptr_attr_0, ctyp_0, &t_0),
            _fx_catch_1);
      }
      else {
         FX_COPY_PTR(ctyp_0, &t_0);
      }
      _fx_LN14C_form__ctyp_t node_0 = 0;
      FX_CALL(_fx_cons_LN14C_form__ctyp_t(t_0, 0, false, &node_0), _fx_catch_1);
      FX_LIST_APPEND(args__0, lstend_0, node_0);

   _fx_catch_1: ;
      if (t_0) {
         _fx_free_N14C_form__ctyp_t(&t_0);
      }
      FX_FREE_LIST_SIMPLE(&ptr_attr_0);
      if (v_4) {
         _fx_free_N14K_form__ktyp_t(&v_4);
      }
      if (ctyp_0) {
         _fx_free_N14C_form__ctyp_t(&ctyp_0);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }
   if (FX_REC_VARIANT_TAG(rt_0) != 7) {
      FX_CALL(_fx_M11C_gen_typesFM9ktyp2ctypN14C_form__ctyp_t2N14K_form__ktyp_tR10Ast__loc_t(rt_0, loc_0, &v_0, 0),
         _fx_cleanup);
      FX_CALL(_fx_M6C_formFM10CTypRawPtrN14C_form__ctyp_t2LN19C_form__ctyp_attr_tN14C_form__ctyp_t(0, v_0, &v_1), _fx_cleanup);
      FX_CALL(_fx_cons_LN14C_form__ctyp_t(v_1, 0, true, &rct_0), _fx_cleanup);
   }
   FX_CALL(_fx_cons_LN14C_form__ctyp_t(_fx_g23C_form__std_CTypVoidPtr, 0, true, &v_2), _fx_cleanup);
   if (rct_0 == 0) {
      FX_COPY_PTR(v_2, &v_3);
   }
   else if (v_2 == 0) {
      FX_COPY_PTR(rct_0, &v_3);
   }
   else {
      _fx_LN14C_form__ctyp_t v_6 = 0;
      _fx_LN14C_form__ctyp_t lstend_1 = 0;
      _fx_LN14C_form__ctyp_t lst_1 = rct_0;
      for (; lst_1; lst_1 = lst_1->tl) {
         _fx_N14C_form__ctyp_t x_0 = lst_1->hd;
         _fx_LN14C_form__ctyp_t node_1 = 0;
         FX_CALL(_fx_cons_LN14C_form__ctyp_t(x_0, 0, false, &node_1), _fx_catch_2);
         FX_LIST_APPEND(v_6, lstend_1, node_1);

      _fx_catch_2: ;
         FX_CHECK_EXN(_fx_catch_3);
      }
      _fx_M11C_gen_typesFM5link2LN14C_form__ctyp_t2LN14C_form__ctyp_tLN14C_form__ctyp_t(v_6, v_2, &v_3, 0);

   _fx_catch_3: ;
      if (v_6) {
         _fx_free_LN14C_form__ctyp_t(&v_6);
      }
   }
   FX_CHECK_EXN(_fx_cleanup);
   if (args__0 == 0) {
      FX_COPY_PTR(v_3, fx_result);
   }
   else if (v_3 == 0) {
      FX_COPY_PTR(args__0, fx_result);
   }
   else {
      _fx_LN14C_form__ctyp_t v_7 = 0;
      _fx_LN14C_form__ctyp_t lstend_2 = 0;
      _fx_LN14C_form__ctyp_t lst_2 = args__0;
      for (; lst_2; lst_2 = lst_2->tl) {
         _fx_N14C_form__ctyp_t x_1 = lst_2->hd;
         _fx_LN14C_form__ctyp_t node_2 = 0;
         FX_CALL(_fx_cons_LN14C_form__ctyp_t(x_1, 0, false, &node_2), _fx_catch_4);
         FX_LIST_APPEND(v_7, lstend_2, node_2);

      _fx_catch_4: ;
         FX_CHECK_EXN(_fx_catch_5);
      }
      _fx_M11C_gen_typesFM5link2LN14C_form__ctyp_t2LN14C_form__ctyp_tLN14C_form__ctyp_t(v_7, v_3, fx_result, 0);

   _fx_catch_5: ;
      if (v_7) {
         _fx_free_LN14C_form__ctyp_t(&v_7);
      }
   }

_fx_cleanup: ;
   if (args__0) {
      _fx_free_LN14C_form__ctyp_t(&args__0);
   }
   if (rct_0) {
      _fx_free_LN14C_form__ctyp_t(&rct_0);
   }
   if (v_0) {
      _fx_free_N14C_form__ctyp_t(&v_0);
   }
   if (v_1) {
      _fx_free_N14C_form__ctyp_t(&v_1);
   }
   if (v_2) {
      _fx_free_LN14C_form__ctyp_t(&v_2);
   }
   if (v_3) {
      _fx_free_LN14C_form__ctyp_t(&v_3);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM9ktyp2ctypN14C_form__ctyp_t2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__ktyp_t_data_t* t_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_N14C_form__ctyp_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   FX_CALL(_fx_M11C_gen_typesFM10ktyp2ctyp_N14C_form__ctyp_t2N14K_form__ktyp_tR10Ast__loc_t(t_0, loc_0, fx_result, 0),
      _fx_cleanup);

_fx_cleanup: ;
   return fx_status;
}

static int _fx_M11C_gen_typesFM10ktyp2ctyp_N14C_form__ctyp_t2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__ktyp_t_data_t* t_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_N14C_form__ctyp_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   int tag_0 = FX_REC_VARIANT_TAG(t_0);
   if (tag_0 == 1) {
      FX_COPY_PTR(_fx_g20C_gen_types__CTypInt, fx_result);
   }
   else if (tag_0 == 6) {
      FX_COPY_PTR(_fx_g21C_gen_types__CTypLong, fx_result);
   }
   else if (tag_0 == 2) {
      FX_COPY_PTR(_fx_g21C_gen_types__CTypCInt, fx_result);
   }
   else if (tag_0 == 3) {
      FX_CALL(_fx_M6C_formFM8CTypSIntN14C_form__ctyp_t1i(t_0->u.KTypSInt, fx_result), _fx_catch_0);  _fx_catch_0: ;
   }
   else if (tag_0 == 4) {
      FX_CALL(_fx_M6C_formFM8CTypUIntN14C_form__ctyp_t1i(t_0->u.KTypUInt, fx_result), _fx_catch_1);  _fx_catch_1: ;
   }
   else if (tag_0 == 5) {
      FX_CALL(_fx_M6C_formFM9CTypFloatN14C_form__ctyp_t1i(t_0->u.KTypFloat, fx_result), _fx_catch_2);  _fx_catch_2: ;
   }
   else if (tag_0 == 7) {
      FX_COPY_PTR(_fx_g21C_gen_types__CTypVoid, fx_result);
   }
   else if (tag_0 == 8) {
      FX_COPY_PTR(_fx_g21C_gen_types__CTypBool, fx_result);
   }
   else if (tag_0 == 9) {
      FX_COPY_PTR(_fx_g24C_gen_types__CTypUniChar, fx_result);
   }
   else if (tag_0 == 10) {
      FX_COPY_PTR(_fx_g23C_gen_types__CTypString, fx_result);
   }
   else if (tag_0 == 11) {
      FX_COPY_PTR(_fx_g26C_gen_types__CTypCSmartPtr, fx_result);
   }
   else if (tag_0 == 12) {
      _fx_N14C_form__ctyp_t v_0 = 0;
      FX_CALL(
         _fx_M11C_gen_typesFM10ktyp2ctyp_N14C_form__ctyp_t2N14K_form__ktyp_tR10Ast__loc_t(t_0->u.KTypRawPointer, loc_0, &v_0,
            0), _fx_catch_3);
      FX_CALL(_fx_M6C_formFM10CTypRawPtrN14C_form__ctyp_t2LN19C_form__ctyp_attr_tN14C_form__ctyp_t(0, v_0, fx_result),
         _fx_catch_3);

   _fx_catch_3: ;
      if (v_0) {
         _fx_free_N14C_form__ctyp_t(&v_0);
      }
   }
   else if (tag_0 == 13) {
      _fx_LN14C_form__ctyp_t args__0 = 0;
      _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t* vcase_0 = &t_0->u.KTypFun;
      FX_CALL(
         _fx_M11C_gen_typesFM15ktyp2ctyp_fargsLN14C_form__ctyp_t3LN14K_form__ktyp_tN14K_form__ktyp_tR10Ast__loc_t(vcase_0->t0,
            vcase_0->t1, loc_0, &args__0, 0), _fx_catch_4);
      FX_CALL(
         _fx_M6C_formFM13CTypFunRawPtrN14C_form__ctyp_t2LN14C_form__ctyp_tN14C_form__ctyp_t(args__0,
            _fx_g21C_gen_types__CTypCInt, fx_result), _fx_catch_4);

   _fx_catch_4: ;
      if (args__0) {
         _fx_free_LN14C_form__ctyp_t(&args__0);
      }
   }
   else if (tag_0 == 14) {
      fx_exn_t v_1 = {0};
      fx_str_t slit_0 =
         FX_MAKE_STR(
            "ktyp2ctyp: KTypTuple is not supported here. It should have been converted to KTypName() at K_mangle stage");
      FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(loc_0, &slit_0, &v_1, 0), _fx_catch_5);
      FX_THROW(&v_1, false, _fx_catch_5);

   _fx_catch_5: ;
      fx_free_exn(&v_1);
   }
   else if (tag_0 == 15) {
      fx_exn_t v_2 = {0};
      fx_str_t slit_1 =
         FX_MAKE_STR(
            "ktyp2ctyp: KTypRecord is not supported here. It should have been converted to KTypName() at K_mangle stage");
      FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(loc_0, &slit_1, &v_2, 0), _fx_catch_6);
      FX_THROW(&v_2, false, _fx_catch_6);

   _fx_catch_6: ;
      fx_free_exn(&v_2);
   }
   else if (tag_0 == 16) {
      FX_CALL(_fx_M6C_formFM8CTypNameN14C_form__ctyp_t1R9Ast__id_t(&t_0->u.KTypName, fx_result), _fx_catch_7);  _fx_catch_7: ;
   }
   else if (tag_0 == 17) {
      _fx_N14C_form__ctyp_t v_3 = 0;
      _fx_T2iN14K_form__ktyp_t* vcase_1 = &t_0->u.KTypArray;
      FX_CALL(_fx_M11C_gen_typesFM10ktyp2ctyp_N14C_form__ctyp_t2N14K_form__ktyp_tR10Ast__loc_t(vcase_1->t1, loc_0, &v_3, 0),
         _fx_catch_8);
      FX_CALL(_fx_M6C_formFM9CTypArrayN14C_form__ctyp_t2iN14C_form__ctyp_t(vcase_1->t0, v_3, fx_result), _fx_catch_8);

   _fx_catch_8: ;
      if (v_3) {
         _fx_free_N14C_form__ctyp_t(&v_3);
      }
   }
   else if (tag_0 == 18) {
      _fx_N14C_form__ctyp_t v_4 = 0;
      FX_CALL(
         _fx_M11C_gen_typesFM10ktyp2ctyp_N14C_form__ctyp_t2N14K_form__ktyp_tR10Ast__loc_t(t_0->u.KTypVector, loc_0, &v_4, 0),
         _fx_catch_9);
      FX_CALL(_fx_M6C_formFM10CTypVectorN14C_form__ctyp_t1N14C_form__ctyp_t(v_4, fx_result), _fx_catch_9);

   _fx_catch_9: ;
      if (v_4) {
         _fx_free_N14C_form__ctyp_t(&v_4);
      }
   }
   else if (tag_0 == 19) {
      fx_exn_t v_5 = {0};
      fx_str_t slit_2 =
         FX_MAKE_STR(
            "ktyp2ctyp: KTypList is not supported here. It should have been converted to KTypName() at K_mangle stage");
      FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(loc_0, &slit_2, &v_5, 0), _fx_catch_10);
      FX_THROW(&v_5, false, _fx_catch_10);

   _fx_catch_10: ;
      fx_free_exn(&v_5);
   }
   else if (tag_0 == 20) {
      fx_exn_t v_6 = {0};
      fx_str_t slit_3 =
         FX_MAKE_STR("ktyp2ctyp: KTypRef is not supported here. It should have been converted to KTypName() at K_mangle stage");
      FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(loc_0, &slit_3, &v_6, 0), _fx_catch_11);
      FX_THROW(&v_6, false, _fx_catch_11);

   _fx_catch_11: ;
      fx_free_exn(&v_6);
   }
   else if (tag_0 == 21) {
      FX_COPY_PTR(_fx_g20C_gen_types__CTypExn, fx_result);
   }
   else if (tag_0 == 22) {
      FX_COPY_PTR(_fx_g21C_gen_types__CTypVoid, fx_result);
   }
   else if (tag_0 == 23) {
      FX_COPY_PTR(_fx_g21C_gen_types__CTypVoid, fx_result);
   }
   else {
      FX_FAST_THROW(FX_EXN_NoMatchError, _fx_cleanup);
   }

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM11get_ctpropsR17C_form__ctprops_t2N14C_form__ctyp_tR10Ast__loc_t(
   struct _fx_N14C_form__ctyp_t_data_t* ctyp_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_R17C_form__ctprops_t* fx_result,
   void* fx_fv)
{
   _fx_R17C_form__ctprops_t ctp_0 = {0};
   fx_exn_t v_0 = {0};
   fx_exn_t v_1 = {0};
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   int tag_0 = FX_REC_VARIANT_TAG(ctyp_0);
   bool res_0;
   if (tag_0 == 1) {
      res_0 = true;
   }
   else if (tag_0 == 2) {
      res_0 = true;
   }
   else if (tag_0 == 3) {
      res_0 = true;
   }
   else if (tag_0 == 4) {
      res_0 = true;
   }
   else if (tag_0 == 5) {
      res_0 = true;
   }
   else if (tag_0 == 7) {
      res_0 = true;
   }
   else if (tag_0 == 8) {
      res_0 = true;
   }
   else if (tag_0 == 9) {
      res_0 = true;
   }
   else if (tag_0 == 10) {
      res_0 = true;
   }
   else {
      res_0 = false;
   }
   FX_CHECK_EXN(_fx_cleanup);
   if (res_0) {
      _fx_Ta2R9Ast__id_t v_2 = { _fx_g9Ast__noid, _fx_g9Ast__noid };
      _fx_Ta2R9Ast__id_t v_3 = { _fx_g9Ast__noid, _fx_g9Ast__noid };
      _fx_make_R17C_form__ctprops_t(true, false, false, false, 0, &v_2, &v_3, &ctp_0);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 11) {
      _fx_Ta2R9Ast__id_t v_4 = { _fx_g9Ast__noid, _fx_g24C_form__std_fx_free_cptr };
      _fx_Ta2R9Ast__id_t v_5 = { _fx_g9Ast__noid, _fx_g24C_form__std_fx_copy_cptr };
      _fx_make_R17C_form__ctprops_t(false, true, true, false, 0, &v_4, &v_5, &ctp_0);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 6) {
      _fx_Ta2R9Ast__id_t v_6 = { _fx_g24C_form__std_FX_FREE_LONG, _fx_g24C_form__std_fx_free_long };
      _fx_Ta2R9Ast__id_t v_7 = { _fx_g9Ast__noid, _fx_g24C_form__std_fx_copy_long };
      _fx_make_R17C_form__ctprops_t(false, true, false, true, 0, &v_6, &v_7, &ctp_0);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 12) {
      _fx_Ta2R9Ast__id_t v_8 = { _fx_g23C_form__std_FX_FREE_STR, _fx_g23C_form__std_fx_free_str };
      _fx_Ta2R9Ast__id_t v_9 = { _fx_g9Ast__noid, _fx_g23C_form__std_fx_copy_str };
      _fx_make_R17C_form__ctprops_t(false, true, false, true, 0, &v_8, &v_9, &ctp_0);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 13) {
      _fx_Ta2R9Ast__id_t v_10 = { _fx_g9Ast__noid, _fx_g23C_form__std_fx_free_exn };
      _fx_Ta2R9Ast__id_t v_11 = { _fx_g9Ast__noid, _fx_g23C_form__std_fx_copy_exn };
      _fx_make_R17C_form__ctprops_t(false, true, false, true, 0, &v_10, &v_11, &ctp_0);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 14) {
      _fx_Nt6option1R9Ast__id_t* v_12 = &ctyp_0->u.CTypStruct.t0;
      if (v_12->tag == 2) {
         _fx_N14C_form__ctyp_t v_13 = 0;
         FX_CALL(_fx_M6C_formFM8CTypNameN14C_form__ctyp_t1R9Ast__id_t(&v_12->u.Some, &v_13), _fx_catch_0);
         FX_CALL(_fx_M11C_gen_typesFM11get_ctpropsR17C_form__ctprops_t2N14C_form__ctyp_tR10Ast__loc_t(v_13, loc_0, &ctp_0, 0),
            _fx_catch_0);

      _fx_catch_0: ;
         if (v_13) {
            _fx_free_N14C_form__ctyp_t(&v_13);
         }
         goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 14) {
      fx_exn_t v_14 = {0};
      fx_str_t slit_0 = FX_MAKE_STR("there is no type properties for the anonymoous struct");
      FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(loc_0, &slit_0, &v_14, 0), _fx_catch_1);
      FX_THROW(&v_14, false, _fx_catch_1);

   _fx_catch_1: ;
      fx_free_exn(&v_14);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 15) {
      _fx_Nt6option1R9Ast__id_t* v_15 = &ctyp_0->u.CTypUnion.t0;
      if (v_15->tag == 2) {
         fx_str_t v_16 = {0};
         fx_str_t v_17 = {0};
         fx_exn_t v_18 = {0};
         FX_CALL(_fx_M6K_formFM7idk2strS2R9Ast__id_tR10Ast__loc_t(&v_15->u.Some, loc_0, &v_16, 0), _fx_catch_2);
         fx_str_t slit_1 = FX_MAKE_STR("there is no type properties for union \'");
         fx_str_t slit_2 = FX_MAKE_STR("\'");
         {
            const fx_str_t strs_0[] = { slit_1, v_16, slit_2 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_0, 3, &v_17), _fx_catch_2);
         }
         FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(loc_0, &v_17, &v_18, 0), _fx_catch_2);
         FX_THROW(&v_18, false, _fx_catch_2);

      _fx_catch_2: ;
         fx_free_exn(&v_18);
         FX_FREE_STR(&v_17);
         FX_FREE_STR(&v_16);
         goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 15) {
      fx_exn_t v_19 = {0};
      fx_str_t slit_3 = FX_MAKE_STR("there is no type properties for the anonymoous union");
      FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(loc_0, &slit_3, &v_19, 0), _fx_catch_3);
      FX_THROW(&v_19, false, _fx_catch_3);

   _fx_catch_3: ;
      fx_free_exn(&v_19);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 16) {
      _fx_Ta2R9Ast__id_t v_20 = { _fx_g9Ast__noid, _fx_g9Ast__noid };
      _fx_Ta2R9Ast__id_t v_21 = { _fx_g9Ast__noid, _fx_g9Ast__noid };
      _fx_make_R17C_form__ctprops_t(true, false, true, false, 0, &v_20, &v_21, &ctp_0);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 17) {
      _fx_Ta2R9Ast__id_t v_22 = { _fx_g9Ast__noid, _fx_g9Ast__noid };
      _fx_Ta2R9Ast__id_t v_23 = { _fx_g9Ast__noid, _fx_g9Ast__noid };
      _fx_make_R17C_form__ctprops_t(true, false, true, false, 0, &v_22, &v_23, &ctp_0);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 18) {
      _fx_Ta2R9Ast__id_t v_24 = { _fx_g9Ast__noid, _fx_g9Ast__noid };
      _fx_Ta2R9Ast__id_t v_25 = { _fx_g9Ast__noid, _fx_g9Ast__noid };
      _fx_make_R17C_form__ctprops_t(false, false, false, false, 0, &v_24, &v_25, &ctp_0);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 19) {
      _fx_Ta2R9Ast__id_t v_26 = { _fx_g23C_form__std_FX_FREE_ARR, _fx_g23C_form__std_fx_free_arr };
      _fx_Ta2R9Ast__id_t v_27 = { _fx_g9Ast__noid, _fx_g23C_form__std_fx_copy_arr };
      _fx_make_R17C_form__ctprops_t(false, true, false, true, 0, &v_26, &v_27, &ctp_0);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 20) {
      _fx_Ta2R9Ast__id_t v_28 = { _fx_g9Ast__noid, _fx_g23C_form__std_fx_free_vec };
      _fx_Ta2R9Ast__id_t v_29 = { _fx_g9Ast__noid, _fx_g23C_form__std_fx_copy_vec };
      _fx_make_R17C_form__ctprops_t(false, true, false, true, 0, &v_28, &v_29, &ctp_0);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 21) {
      _fx_N15C_form__cinfo_t v_30 = {0};
      _fx_R9Ast__id_t* i_0 = &ctyp_0->u.CTypName;
      FX_CALL(_fx_M6C_formFM6cinfo_N15C_form__cinfo_t2R9Ast__id_tR10Ast__loc_t(i_0, loc_0, &v_30, 0), _fx_catch_5);
      int tag_1 = v_30.tag;
      if (tag_1 == 4) {
         _fx_R17C_form__cdeftyp_t v_31 = {0};
         _fx_copy_R17C_form__cdeftyp_t(&v_30.u.CTyp->data, &v_31);
         _fx_copy_R17C_form__ctprops_t(&v_31.ct_props, &ctp_0);
         _fx_free_R17C_form__cdeftyp_t(&v_31);
      }
      else if (tag_1 == 6) {
         _fx_Ta2R9Ast__id_t v_32 = { _fx_g25C_form__std_FX_FREE_IFACE, _fx_g25C_form__std_fx_free_iface };
         _fx_Ta2R9Ast__id_t v_33 = { _fx_g25C_form__std_FX_COPY_IFACE, _fx_g25C_form__std_fx_copy_iface };
         _fx_make_R17C_form__ctprops_t(false, true, false, true, 0, &v_32, &v_33, &ctp_0);
      }
      else {
         fx_str_t v_34 = {0};
         fx_str_t v_35 = {0};
         fx_exn_t v_36 = {0};
         FX_CALL(_fx_M6K_formFM7idk2strS2R9Ast__id_tR10Ast__loc_t(i_0, loc_0, &v_34, 0), _fx_catch_4);
         fx_str_t slit_4 = FX_MAKE_STR("properties of non-type \'");
         fx_str_t slit_5 = FX_MAKE_STR("\' cannot be requested");
         {
            const fx_str_t strs_1[] = { slit_4, v_34, slit_5 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_1, 3, &v_35), _fx_catch_4);
         }
         FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(loc_0, &v_35, &v_36, 0), _fx_catch_4);
         FX_THROW(&v_36, false, _fx_catch_4);

      _fx_catch_4: ;
         fx_free_exn(&v_36);
         FX_FREE_STR(&v_35);
         FX_FREE_STR(&v_34);
      }
      FX_CHECK_EXN(_fx_catch_5);

   _fx_catch_5: ;
      _fx_free_N15C_form__cinfo_t(&v_30);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 22) {
      fx_exn_t v_37 = {0};
      fx_str_t slit_6 = FX_MAKE_STR("properties of label cannot be requested");
      FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(loc_0, &slit_6, &v_37, 0), _fx_catch_6);
      FX_THROW(&v_37, false, _fx_catch_6);

   _fx_catch_6: ;
      fx_free_exn(&v_37);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 23) {
      fx_exn_t v_38 = {0};
      fx_str_t slit_7 = FX_MAKE_STR("properties of \'any type\' cannot be requested");
      FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(loc_0, &slit_7, &v_38, 0), _fx_catch_7);
      FX_THROW(&v_38, false, _fx_catch_7);

   _fx_catch_7: ;
      fx_free_exn(&v_38);
      goto _fx_endmatch_0;
   }
   FX_FAST_THROW(FX_EXN_NoMatchError, _fx_cleanup);

_fx_endmatch_0: ;
   FX_CHECK_EXN(_fx_cleanup);
   _fx_Ta2R9Ast__id_t* v_39 = &ctp_0.ctp_copy;
   _fx_R9Ast__id_t copy_m_0 = v_39->t0;
   _fx_R9Ast__id_t copy_f_0 = v_39->t1;
   _fx_Ta2R9Ast__id_t* v_40 = &ctp_0.ctp_free;
   _fx_R9Ast__id_t free_m_0 = v_40->t0;
   _fx_R9Ast__id_t free_f_0 = v_40->t1;
   bool res_1;
   FX_CALL(_fx_M3AstFM6__eq__B2RM4id_tRM4id_t(&free_m_0, &_fx_g9Ast__noid, &res_1, 0), _fx_cleanup);
   bool t_0;
   if (!res_1) {
      FX_CALL(_fx_M3AstFM6__eq__B2RM4id_tRM4id_t(&free_f_0, &_fx_g9Ast__noid, &t_0, 0), _fx_cleanup);
   }
   else {
      t_0 = false;
   }
   if (t_0) {
      fx_str_t slit_8 = FX_MAKE_STR("cgen: if free_m is non-empty then free_f must also be non-empty");
      FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(loc_0, &slit_8, &v_0, 0), _fx_cleanup);
      FX_THROW(&v_0, false, _fx_cleanup);
   }
   bool res_2;
   FX_CALL(_fx_M3AstFM6__eq__B2RM4id_tRM4id_t(&copy_m_0, &_fx_g9Ast__noid, &res_2, 0), _fx_cleanup);
   bool t_1;
   if (!res_2) {
      FX_CALL(_fx_M3AstFM6__eq__B2RM4id_tRM4id_t(&copy_f_0, &_fx_g9Ast__noid, &t_1, 0), _fx_cleanup);
   }
   else {
      t_1 = false;
   }
   if (t_1) {
      fx_str_t slit_9 = FX_MAKE_STR("cgen: if copy_m is non-empty then copy_f must also be non-empty");
      FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(loc_0, &slit_9, &v_1, 0), _fx_cleanup);
      FX_THROW(&v_1, false, _fx_cleanup);
   }
   _fx_copy_R17C_form__ctprops_t(&ctp_0, fx_result);

_fx_cleanup: ;
   _fx_free_R17C_form__ctprops_t(&ctp_0);
   fx_free_exn(&v_0);
   fx_free_exn(&v_1);
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM15get_constructorR9Ast__id_t3N14C_form__ctyp_tBR10Ast__loc_t(
   struct _fx_N14C_form__ctyp_t_data_t* ctyp_0,
   bool required_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_R9Ast__id_t* fx_result,
   void* fx_fv)
{
   _fx_R17C_form__ctprops_t v_0 = {0};
   _fx_LR9Ast__id_t ctp_make_0 = 0;
   int fx_status = 0;
   FX_CALL(_fx_M11C_gen_typesFM11get_ctpropsR17C_form__ctprops_t2N14C_form__ctyp_tR10Ast__loc_t(ctyp_0, loc_0, &v_0, 0),
      _fx_cleanup);
   FX_COPY_PTR(v_0.ctp_make, &ctp_make_0);
   if (ctp_make_0 != 0) {
      if (ctp_make_0->tl == 0) {
         *fx_result = ctp_make_0->hd; goto _fx_endmatch_0;
      }
   }
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_exn_t v_3 = {0};
   if (!required_0) {
      *fx_result = _fx_g9Ast__noid;
   }
   else {
      FX_CALL(_fx_M6C_formFM9ctyp2str_S2N14C_form__ctyp_tR10Ast__loc_t(ctyp_0, loc_0, &v_1, 0), _fx_catch_0);
      fx_str_t slit_0 = FX_MAKE_STR("cgen: missing type constructor for \'");
      fx_str_t slit_1 = FX_MAKE_STR("\'");
      {
         const fx_str_t strs_0[] = { slit_0, v_1, slit_1 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 3, &v_2), _fx_catch_0);
      }
      FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(loc_0, &v_2, &v_3, 0), _fx_catch_0);
      FX_THROW(&v_3, false, _fx_catch_0);
   }

_fx_catch_0: ;
   fx_free_exn(&v_3);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&v_1);

_fx_endmatch_0: ;

_fx_cleanup: ;
   _fx_free_R17C_form__ctprops_t(&v_0);
   FX_FREE_LIST_SIMPLE(&ctp_make_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM10get_free_fT2BNt6option1N14C_form__cexp_t4N14C_form__ctyp_tBBR10Ast__loc_t(
   struct _fx_N14C_form__ctyp_t_data_t* ctyp_0,
   bool let_none_0,
   bool let_macro_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_T2BNt6option1N14C_form__cexp_t* fx_result,
   void* fx_fv)
{
   _fx_R17C_form__ctprops_t v_0 = {0};
   _fx_N14C_form__cexp_t v_1 = 0;
   _fx_Nt6option1N14C_form__cexp_t v_2 = {0};
   int fx_status = 0;
   FX_CALL(_fx_M11C_gen_typesFM11get_ctpropsR17C_form__ctprops_t2N14C_form__ctyp_tR10Ast__loc_t(ctyp_0, loc_0, &v_0, 0),
      _fx_cleanup);
   _fx_Ta2R9Ast__id_t* v_3 = &v_0.ctp_free;
   _fx_R9Ast__id_t free_m_0 = v_3->t0;
   _fx_R9Ast__id_t free_f_0 = v_3->t1;
   bool ctp_ptr_0 = v_0.ctp_ptr;
   bool res_0;
   FX_CALL(_fx_M3AstFM6__eq__B2RM4id_tRM4id_t(&free_m_0, &_fx_g9Ast__noid, &res_0, 0), _fx_cleanup);
   bool t_0;
   if (res_0) {
      FX_CALL(_fx_M3AstFM6__eq__B2RM4id_tRM4id_t(&free_f_0, &_fx_g9Ast__noid, &t_0, 0), _fx_cleanup);
   }
   else {
      t_0 = false;
   }
   bool t_1;
   if (t_0) {
      t_1 = let_none_0;
   }
   else {
      t_1 = false;
   }
   if (t_1) {
      _fx_make_T2BNt6option1N14C_form__cexp_t(false, &_fx_g19C_gen_types__None3_, fx_result);
   }
   else {
      bool t_2;
      if (let_macro_0) {
         bool res_1;
         FX_CALL(_fx_M3AstFM6__eq__B2RM4id_tRM4id_t(&free_m_0, &_fx_g9Ast__noid, &res_1, 0), _fx_cleanup);
         t_2 = !res_1;
      }
      else {
         t_2 = false;
      }
      _fx_T2BR9Ast__id_t v_4;
      if (t_2) {
         _fx_T2BR9Ast__id_t tup_0 = { false, free_m_0 }; v_4 = tup_0;
      }
      else {
         bool res_2;
         FX_CALL(_fx_M3AstFM6__eq__B2RM4id_tRM4id_t(&free_f_0, &_fx_g9Ast__noid, &res_2, 0), _fx_cleanup);
         if (!res_2) {
            _fx_T2BR9Ast__id_t tup_1 = { ctp_ptr_0, free_f_0 }; v_4 = tup_1;
         }
         else {
            _fx_T2BR9Ast__id_t tup_2 = { false, _fx_g18C_form__std_FX_NOP }; v_4 = tup_2;
         }
      }
      bool use_if_0 = v_4.t0;
      _fx_R9Ast__id_t i_0 = v_4.t1;
      FX_CALL(_fx_M6C_formFM11make_id_expN14C_form__cexp_t2R9Ast__id_tR10Ast__loc_t(&i_0, loc_0, &v_1, 0), _fx_cleanup);
      _fx_M11C_gen_typesFM4SomeNt6option1N14C_form__cexp_t1N14C_form__cexp_t(v_1, &v_2);
      _fx_make_T2BNt6option1N14C_form__cexp_t(use_if_0, &v_2, fx_result);
   }

_fx_cleanup: ;
   _fx_free_R17C_form__ctprops_t(&v_0);
   if (v_1) {
      _fx_free_N14C_form__cexp_t(&v_1);
   }
   _fx_free_Nt6option1N14C_form__cexp_t(&v_2);
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM10get_copy_fT2BNt6option1N14C_form__cexp_t4N14C_form__ctyp_tBBR10Ast__loc_t(
   struct _fx_N14C_form__ctyp_t_data_t* ctyp_0,
   bool let_none_0,
   bool let_macro_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_T2BNt6option1N14C_form__cexp_t* fx_result,
   void* fx_fv)
{
   _fx_R17C_form__ctprops_t v_0 = {0};
   _fx_Nt6option1N14C_form__cexp_t v_1 = {0};
   _fx_N14C_form__cexp_t v_2 = 0;
   int fx_status = 0;
   FX_CALL(_fx_M11C_gen_typesFM11get_ctpropsR17C_form__ctprops_t2N14C_form__ctyp_tR10Ast__loc_t(ctyp_0, loc_0, &v_0, 0),
      _fx_cleanup);
   _fx_Ta2R9Ast__id_t* v_3 = &v_0.ctp_copy;
   _fx_R9Ast__id_t copy_m_0 = v_3->t0;
   _fx_R9Ast__id_t copy_f_0 = v_3->t1;
   bool ctp_pass_by_ref_0 = v_0.ctp_pass_by_ref;
   bool res_0;
   FX_CALL(_fx_M3AstFM6__eq__B2RM4id_tRM4id_t(&copy_m_0, &_fx_g9Ast__noid, &res_0, 0), _fx_cleanup);
   bool t_0;
   if (res_0) {
      FX_CALL(_fx_M3AstFM6__eq__B2RM4id_tRM4id_t(&copy_f_0, &_fx_g9Ast__noid, &t_0, 0), _fx_cleanup);
   }
   else {
      t_0 = false;
   }
   bool t_1;
   if (t_0) {
      t_1 = let_none_0;
   }
   else {
      t_1 = false;
   }
   if (t_1) {
      _fx_copy_Nt6option1N14C_form__cexp_t(&_fx_g19C_gen_types__None3_, &v_1);
   }
   else {
      bool res_1;
      FX_CALL(_fx_M3AstFM6__eq__B2RM4id_tRM4id_t(&copy_m_0, &_fx_g9Ast__noid, &res_1, 0), _fx_cleanup);
      bool t_2;
      if (!res_1) {
         t_2 = let_macro_0;
      }
      else {
         t_2 = false;
      }
      _fx_R9Ast__id_t i_0;
      if (t_2) {
         i_0 = copy_m_0;
      }
      else {
         bool res_2;
         FX_CALL(_fx_M3AstFM6__eq__B2RM4id_tRM4id_t(&copy_f_0, &_fx_g9Ast__noid, &res_2, 0), _fx_cleanup);
         if (!res_2) {
            i_0 = copy_f_0;
         }
         else if (ctp_pass_by_ref_0) {
            i_0 = _fx_g33C_form__std_FX_COPY_SIMPLE_BY_PTR;
         }
         else {
            i_0 = _fx_g26C_form__std_FX_COPY_SIMPLE;
         }
      }
      FX_CALL(_fx_M6C_formFM11make_id_expN14C_form__cexp_t2R9Ast__id_tR10Ast__loc_t(&i_0, loc_0, &v_2, 0), _fx_cleanup);
      _fx_M11C_gen_typesFM4SomeNt6option1N14C_form__cexp_t1N14C_form__cexp_t(v_2, &v_1);
   }
   _fx_make_T2BNt6option1N14C_form__cexp_t(ctp_pass_by_ref_0, &v_1, fx_result);

_fx_cleanup: ;
   _fx_free_R17C_form__ctprops_t(&v_0);
   _fx_free_Nt6option1N14C_form__cexp_t(&v_1);
   if (v_2) {
      _fx_free_N14C_form__cexp_t(&v_2);
   }
   return fx_status;
}

FX_EXTERN_C int
   _fx_M11C_gen_typesFM13gen_copy_codeLN15C_form__cstmt_t5N14C_form__cexp_tN14C_form__cexp_tN14C_form__ctyp_tLN15C_form__cstmt_tR10Ast__loc_t(
   struct _fx_N14C_form__cexp_t_data_t* src_exp_0,
   struct _fx_N14C_form__cexp_t_data_t* dst_exp_0,
   struct _fx_N14C_form__ctyp_t_data_t* ctyp_0,
   struct _fx_LN15C_form__cstmt_t_data_t* code_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_LN15C_form__cstmt_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_R17C_form__ctprops_t v_0 = {0};
   _fx_Nt6option1N14C_form__cexp_t v_1 = {0};
   _fx_N14C_form__cexp_t v_2 = 0;
   _fx_T2N14C_form__ctyp_tR10Ast__loc_t ctx_0 = {0};
   _fx_N14C_form__cexp_t e_0 = 0;
   _fx_N15C_form__cstmt_t v_3 = 0;
   int fx_status = 0;
   FX_CALL(_fx_M11C_gen_typesFM11get_ctpropsR17C_form__ctprops_t2N14C_form__ctyp_tR10Ast__loc_t(ctyp_0, loc_0, &v_0, 0),
      _fx_cleanup);
   _fx_Ta2R9Ast__id_t* v_4 = &v_0.ctp_copy;
   _fx_R9Ast__id_t copy_m_0 = v_4->t0;
   _fx_R9Ast__id_t copy_f_0 = v_4->t1;
   bool ctp_pass_by_ref_0 = v_0.ctp_pass_by_ref;
   bool res_0;
   FX_CALL(_fx_M3AstFM6__eq__B2RM4id_tRM4id_t(&copy_m_0, &_fx_g9Ast__noid, &res_0, 0), _fx_cleanup);
   bool t_0;
   if (res_0) {
      FX_CALL(_fx_M3AstFM6__eq__B2RM4id_tRM4id_t(&copy_f_0, &_fx_g9Ast__noid, &t_0, 0), _fx_cleanup);
   }
   else {
      t_0 = false;
   }
   bool t_1;
   if (t_0) {
      t_1 = true;
   }
   else {
      t_1 = false;
   }
   if (t_1) {
      _fx_copy_Nt6option1N14C_form__cexp_t(&_fx_g19C_gen_types__None3_, &v_1);
   }
   else {
      bool res_1;
      FX_CALL(_fx_M3AstFM6__eq__B2RM4id_tRM4id_t(&copy_m_0, &_fx_g9Ast__noid, &res_1, 0), _fx_cleanup);
      bool t_2;
      if (!res_1) {
         t_2 = true;
      }
      else {
         t_2 = false;
      }
      _fx_R9Ast__id_t i_0;
      if (t_2) {
         i_0 = copy_m_0;
      }
      else {
         bool res_2;
         FX_CALL(_fx_M3AstFM6__eq__B2RM4id_tRM4id_t(&copy_f_0, &_fx_g9Ast__noid, &res_2, 0), _fx_cleanup);
         if (!res_2) {
            i_0 = copy_f_0;
         }
         else if (ctp_pass_by_ref_0) {
            i_0 = _fx_g33C_form__std_FX_COPY_SIMPLE_BY_PTR;
         }
         else {
            i_0 = _fx_g26C_form__std_FX_COPY_SIMPLE;
         }
      }
      FX_CALL(_fx_M6C_formFM11make_id_expN14C_form__cexp_t2R9Ast__id_tR10Ast__loc_t(&i_0, loc_0, &v_2, 0), _fx_cleanup);
      _fx_M11C_gen_typesFM4SomeNt6option1N14C_form__cexp_t1N14C_form__cexp_t(v_2, &v_1);
   }
   _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(_fx_g21C_gen_types__CTypVoid, loc_0, &ctx_0);
   if (FX_REC_VARIANT_TAG(src_exp_0) == 2) {
      if (src_exp_0->u.CExpLit.t0.tag == 8) {
         if (v_1.tag == 2) {
            _fx_N14C_form__cexp_t v_5 = v_1.u.Some;
            if (FX_REC_VARIANT_TAG(v_5) == 1) {
               bool res_3;
               FX_CALL(_fx_M3AstFM6__eq__B2RM4id_tRM4id_t(&v_5->u.CExpIdent.t0, &_fx_g23C_form__std_FX_COPY_PTR, &res_3, 0),
                  _fx_cleanup);
               if (res_3) {
                  FX_CALL(
                     _fx_M6C_formFM10CExpBinaryN14C_form__cexp_t4N17C_form__cbinary_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
                        &_fx_g22C_gen_types__COpAssign, dst_exp_0, src_exp_0, &ctx_0, &e_0), _fx_catch_0);

               _fx_catch_0: ;
                  goto _fx_endmatch_0;
               }
            }
         }
      }
   }
   if (v_1.tag == 2) {
      _fx_N14C_form__cexp_t src_exp_1 = 0;
      _fx_N14C_form__cexp_t dst_exp_1 = 0;
      _fx_LN14C_form__cexp_t v_6 = 0;
      if (ctp_pass_by_ref_0) {
         FX_CALL(_fx_M6C_formFM13cexp_get_addrN14C_form__cexp_t1N14C_form__cexp_t(src_exp_0, &src_exp_1, 0), _fx_catch_1);
      }
      else {
         FX_COPY_PTR(src_exp_0, &src_exp_1);
      }
      FX_CALL(_fx_M6C_formFM13cexp_get_addrN14C_form__cexp_t1N14C_form__cexp_t(dst_exp_0, &dst_exp_1, 0), _fx_catch_1);
      FX_CALL(_fx_cons_LN14C_form__cexp_t(dst_exp_1, 0, true, &v_6), _fx_catch_1);
      FX_CALL(_fx_cons_LN14C_form__cexp_t(src_exp_1, v_6, false, &v_6), _fx_catch_1);
      FX_CALL(
         _fx_M6C_formFM8CExpCallN14C_form__cexp_t3N14C_form__cexp_tLN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
            v_1.u.Some, v_6, &ctx_0, &e_0), _fx_catch_1);

   _fx_catch_1: ;
      if (v_6) {
         _fx_free_LN14C_form__cexp_t(&v_6);
      }
      if (dst_exp_1) {
         _fx_free_N14C_form__cexp_t(&dst_exp_1);
      }
      if (src_exp_1) {
         _fx_free_N14C_form__cexp_t(&src_exp_1);
      }
      goto _fx_endmatch_0;
   }
   FX_CALL(
      _fx_M6C_formFM10CExpBinaryN14C_form__cexp_t4N17C_form__cbinary_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
         &_fx_g22C_gen_types__COpAssign, dst_exp_0, src_exp_0, &ctx_0, &e_0), _fx_catch_2);

_fx_catch_2: ;

_fx_endmatch_0: ;
   FX_CHECK_EXN(_fx_cleanup);
   FX_CALL(_fx_M6C_formFM4CExpN15C_form__cstmt_t1N14C_form__cexp_t(e_0, &v_3), _fx_cleanup);
   FX_CALL(_fx_cons_LN15C_form__cstmt_t(v_3, code_0, true, fx_result), _fx_cleanup);

_fx_cleanup: ;
   _fx_free_R17C_form__ctprops_t(&v_0);
   _fx_free_Nt6option1N14C_form__cexp_t(&v_1);
   if (v_2) {
      _fx_free_N14C_form__cexp_t(&v_2);
   }
   _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&ctx_0);
   if (e_0) {
      _fx_free_N14C_form__cexp_t(&e_0);
   }
   if (v_3) {
      _fx_free_N15C_form__cstmt_t(&v_3);
   }
   return fx_status;
}

FX_EXTERN_C int
   _fx_M11C_gen_typesFM13gen_free_codeLN15C_form__cstmt_t6N14C_form__cexp_tN14C_form__ctyp_tBBLN15C_form__cstmt_tR10Ast__loc_t(
   struct _fx_N14C_form__cexp_t_data_t* elem_exp_0,
   struct _fx_N14C_form__ctyp_t_data_t* ctyp_0,
   bool let_macro_0,
   bool use_if_0,
   struct _fx_LN15C_form__cstmt_t_data_t* code_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_LN15C_form__cstmt_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_T2BNt6option1N14C_form__cexp_t v_0 = {0};
   _fx_Nt6option1N14C_form__cexp_t free_f_opt_0 = {0};
   _fx_T2N14C_form__ctyp_tR10Ast__loc_t ctx_0 = {0};
   _fx_N14C_form__cexp_t elem_exp_ptr_0 = 0;
   int fx_status = 0;
   FX_CALL(
      _fx_M11C_gen_typesFM10get_free_fT2BNt6option1N14C_form__cexp_t4N14C_form__ctyp_tBBR10Ast__loc_t(ctyp_0, true, let_macro_0,
         loc_0, &v_0, 0), _fx_cleanup);
   bool can_use_if_0 = v_0.t0;
   _fx_copy_Nt6option1N14C_form__cexp_t(&v_0.t1, &free_f_opt_0);
   _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(_fx_g21C_gen_types__CTypVoid, loc_0, &ctx_0);
   FX_CALL(_fx_M6C_formFM13cexp_get_addrN14C_form__cexp_t1N14C_form__cexp_t(elem_exp_0, &elem_exp_ptr_0, 0), _fx_cleanup);
   if (free_f_opt_0.tag == 2) {
      _fx_LN14C_form__cexp_t v_1 = 0;
      _fx_N14C_form__cexp_t v_2 = 0;
      _fx_N15C_form__cstmt_t call_stmt_0 = 0;
      _fx_N15C_form__cstmt_t stmt_0 = 0;
      _fx_N15C_form__cstmt_t v_3 = 0;
      FX_CALL(_fx_cons_LN14C_form__cexp_t(elem_exp_ptr_0, 0, true, &v_1), _fx_catch_0);
      FX_CALL(
         _fx_M6C_formFM8CExpCallN14C_form__cexp_t3N14C_form__cexp_tLN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
            free_f_opt_0.u.Some, v_1, &ctx_0, &v_2), _fx_catch_0);
      FX_CALL(_fx_M6C_formFM4CExpN15C_form__cstmt_t1N14C_form__cexp_t(v_2, &call_stmt_0), _fx_catch_0);
      bool t_0;
      if (can_use_if_0) {
         t_0 = use_if_0;
      }
      else {
         t_0 = false;
      }
      if (t_0) {
         FX_CALL(_fx_M6C_formFM8CStmtNopN15C_form__cstmt_t1R10Ast__loc_t(loc_0, &v_3), _fx_catch_0);
         FX_CALL(
            _fx_M6C_formFM7CStmtIfN15C_form__cstmt_t4N14C_form__cexp_tN15C_form__cstmt_tN15C_form__cstmt_tR10Ast__loc_t(
               elem_exp_0, call_stmt_0, v_3, loc_0, &stmt_0), _fx_catch_0);
      }
      else {
         FX_COPY_PTR(call_stmt_0, &stmt_0);
      }
      FX_CALL(_fx_cons_LN15C_form__cstmt_t(stmt_0, code_0, true, fx_result), _fx_catch_0);

   _fx_catch_0: ;
      if (v_3) {
         _fx_free_N15C_form__cstmt_t(&v_3);
      }
      if (stmt_0) {
         _fx_free_N15C_form__cstmt_t(&stmt_0);
      }
      if (call_stmt_0) {
         _fx_free_N15C_form__cstmt_t(&call_stmt_0);
      }
      if (v_2) {
         _fx_free_N14C_form__cexp_t(&v_2);
      }
      if (v_1) {
         _fx_free_LN14C_form__cexp_t(&v_1);
      }
   }
   else {
      FX_COPY_PTR(code_0, fx_result);
   }

_fx_cleanup: ;
   _fx_free_T2BNt6option1N14C_form__cexp_t(&v_0);
   _fx_free_Nt6option1N14C_form__cexp_t(&free_f_opt_0);
   _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&ctx_0);
   if (elem_exp_ptr_0) {
      _fx_free_N14C_form__cexp_t(&elem_exp_ptr_0);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM15decref_and_freeLN15C_form__cstmt_t3N14C_form__cexp_tLN15C_form__cstmt_tR10Ast__loc_t(
   struct _fx_N14C_form__cexp_t_data_t* dst_exp_0,
   struct _fx_LN15C_form__cstmt_t_data_t* free_code_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_LN15C_form__cstmt_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_T2N14C_form__ctyp_tR10Ast__loc_t v_0 = {0};
   _fx_N14C_form__cexp_t rc_exp_0 = 0;
   _fx_LN14C_form__cexp_t v_1 = 0;
   _fx_N14C_form__cexp_t decref_exp_0 = 0;
   _fx_N14C_form__cexp_t v_2 = 0;
   _fx_T2N14C_form__ctyp_tR10Ast__loc_t v_3 = {0};
   _fx_N14C_form__cexp_t cmp_1_exp_0 = 0;
   _fx_T2N14C_form__ctyp_tR10Ast__loc_t v_4 = {0};
   _fx_N14C_form__cexp_t cc_exp_0 = 0;
   _fx_LN14C_form__cexp_t v_5 = 0;
   _fx_N14C_form__cexp_t call_free_0 = 0;
   _fx_N15C_form__cstmt_t v_6 = 0;
   _fx_LN15C_form__cstmt_t v_7 = 0;
   _fx_N15C_form__cstmt_t then_exp_0 = 0;
   _fx_N14C_form__cexp_t v_8 = 0;
   _fx_T2N14C_form__ctyp_tR10Ast__loc_t v_9 = {0};
   _fx_N14C_form__cexp_t clear_ptr_0 = 0;
   _fx_N15C_form__cstmt_t v_10 = 0;
   _fx_N15C_form__cstmt_t v_11 = 0;
   _fx_N15C_form__cstmt_t v_12 = 0;
   _fx_LN15C_form__cstmt_t v_13 = 0;
   int fx_status = 0;
   _fx_R9Ast__id_t v_14;
   fx_str_t slit_0 = FX_MAKE_STR("rc");
   FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&slit_0, &v_14, 0), _fx_cleanup);
   _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(_fx_g20C_gen_types__CTypInt, loc_0, &v_0);
   FX_CALL(
      _fx_M6C_formFM9CExpArrowN14C_form__cexp_t3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(dst_exp_0, &v_14,
         &v_0, &rc_exp_0), _fx_cleanup);
   FX_CALL(_fx_cons_LN14C_form__cexp_t(rc_exp_0, 0, true, &v_1), _fx_cleanup);
   FX_CALL(
      _fx_M6C_formFM9make_callN14C_form__cexp_t4R9Ast__id_tLN14C_form__cexp_tN14C_form__ctyp_tR10Ast__loc_t(
         &_fx_g21C_form__std_FX_DECREF, v_1, _fx_g20C_gen_types__CTypInt, loc_0, &decref_exp_0, 0), _fx_cleanup);
   _fx_N17C_form__cbinary_t v_15;
   _fx_M6C_formFM6COpCmpN17C_form__cbinary_t1N12Ast__cmpop_t(&_fx_g18C_gen_types__CmpEQ, &v_15);
   FX_CALL(_fx_M6C_formFM12make_int_expN14C_form__cexp_t2iR10Ast__loc_t(1, loc_0, &v_2, 0), _fx_cleanup);
   _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(_fx_g21C_gen_types__CTypBool, loc_0, &v_3);
   FX_CALL(
      _fx_M6C_formFM10CExpBinaryN14C_form__cexp_t4N17C_form__cbinary_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
         &v_15, decref_exp_0, v_2, &v_3, &cmp_1_exp_0), _fx_cleanup);
   _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(_fx_g21C_gen_types__CTypBool, loc_0, &v_4);
   FX_CALL(
      _fx_M6C_formFM10CExpBinaryN14C_form__cexp_t4N17C_form__cbinary_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
         &_fx_g24C_gen_types__COpLogicAnd, dst_exp_0, cmp_1_exp_0, &v_4, &cc_exp_0), _fx_cleanup);
   FX_CALL(_fx_cons_LN14C_form__cexp_t(dst_exp_0, 0, true, &v_5), _fx_cleanup);
   FX_CALL(
      _fx_M6C_formFM9make_callN14C_form__cexp_t4R9Ast__id_tLN14C_form__cexp_tN14C_form__ctyp_tR10Ast__loc_t(
         &_fx_g19C_form__std_fx_free, v_5, _fx_g21C_gen_types__CTypVoid, loc_0, &call_free_0, 0), _fx_cleanup);
   FX_CALL(_fx_M6C_formFM4CExpN15C_form__cstmt_t1N14C_form__cexp_t(call_free_0, &v_6), _fx_cleanup);
   FX_CALL(_fx_cons_LN15C_form__cstmt_t(v_6, free_code_0, true, &v_7), _fx_cleanup);
   FX_CALL(_fx_M6C_formFM11rccode2stmtN15C_form__cstmt_t2LN15C_form__cstmt_tR10Ast__loc_t(v_7, loc_0, &then_exp_0, 0),
      _fx_cleanup);
   FX_CALL(_fx_M6C_formFM12make_nullptrN14C_form__cexp_t1R10Ast__loc_t(loc_0, &v_8, 0), _fx_cleanup);
   _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(_fx_g21C_gen_types__CTypVoid, loc_0, &v_9);
   FX_CALL(
      _fx_M6C_formFM10CExpBinaryN14C_form__cexp_t4N17C_form__cbinary_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
         &_fx_g22C_gen_types__COpAssign, dst_exp_0, v_8, &v_9, &clear_ptr_0), _fx_cleanup);
   FX_CALL(_fx_M6C_formFM4CExpN15C_form__cstmt_t1N14C_form__cexp_t(clear_ptr_0, &v_10), _fx_cleanup);
   FX_CALL(_fx_M6C_formFM8CStmtNopN15C_form__cstmt_t1R10Ast__loc_t(loc_0, &v_11), _fx_cleanup);
   FX_CALL(
      _fx_M6C_formFM7CStmtIfN15C_form__cstmt_t4N14C_form__cexp_tN15C_form__cstmt_tN15C_form__cstmt_tR10Ast__loc_t(cc_exp_0,
         then_exp_0, v_11, loc_0, &v_12), _fx_cleanup);
   FX_CALL(_fx_cons_LN15C_form__cstmt_t(v_12, 0, true, &v_13), _fx_cleanup);
   FX_CALL(_fx_cons_LN15C_form__cstmt_t(v_10, v_13, true, fx_result), _fx_cleanup);

_fx_cleanup: ;
   _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&v_0);
   if (rc_exp_0) {
      _fx_free_N14C_form__cexp_t(&rc_exp_0);
   }
   if (v_1) {
      _fx_free_LN14C_form__cexp_t(&v_1);
   }
   if (decref_exp_0) {
      _fx_free_N14C_form__cexp_t(&decref_exp_0);
   }
   if (v_2) {
      _fx_free_N14C_form__cexp_t(&v_2);
   }
   _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&v_3);
   if (cmp_1_exp_0) {
      _fx_free_N14C_form__cexp_t(&cmp_1_exp_0);
   }
   _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&v_4);
   if (cc_exp_0) {
      _fx_free_N14C_form__cexp_t(&cc_exp_0);
   }
   if (v_5) {
      _fx_free_LN14C_form__cexp_t(&v_5);
   }
   if (call_free_0) {
      _fx_free_N14C_form__cexp_t(&call_free_0);
   }
   if (v_6) {
      _fx_free_N15C_form__cstmt_t(&v_6);
   }
   if (v_7) {
      _fx_free_LN15C_form__cstmt_t(&v_7);
   }
   if (then_exp_0) {
      _fx_free_N15C_form__cstmt_t(&then_exp_0);
   }
   if (v_8) {
      _fx_free_N14C_form__cexp_t(&v_8);
   }
   _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&v_9);
   if (clear_ptr_0) {
      _fx_free_N14C_form__cexp_t(&clear_ptr_0);
   }
   if (v_10) {
      _fx_free_N15C_form__cstmt_t(&v_10);
   }
   if (v_11) {
      _fx_free_N15C_form__cstmt_t(&v_11);
   }
   if (v_12) {
      _fx_free_N15C_form__cstmt_t(&v_12);
   }
   if (v_13) {
      _fx_free_LN15C_form__cstmt_t(&v_13);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM15fold_n_cvt_ktypv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t(
   struct _fx_N14K_form__ktyp_t_data_t* t_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_R22K_form__k_fold_callb_t* callb_0,
   void* fx_fv)
{
   int fx_status = 0;
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM16convert_all_typsTa3LN15C_form__cstmt_t1LR17K_form__kmodule_t(
   struct _fx_LR17K_form__kmodule_t_data_t* kmods_0,
   struct _fx_Ta3LN15C_form__cstmt_t* fx_result,
   void* fx_fv)
{
   _fx_rLN15C_form__cstmt_t top_fwd_decl_ref_0 = 0;
   _fx_rLN15C_form__cstmt_t top_typ_decl_ref_0 = 0;
   _fx_rLN15C_form__cstmt_t top_typfun_decl_ref_0 = 0;
   _fx_rRt6Set__t1R9Ast__id_t all_decls_ref_0 = 0;
   _fx_rRt6Set__t1R9Ast__id_t all_fwd_decls_ref_0 = 0;
   _fx_rRt6Set__t1R9Ast__id_t all_visited_ref_0 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_id_0 = {0};
   _fx_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t all_saved_rec_vars_arg_0 = {0};
   _fx_rRt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t all_saved_rec_vars_ref_0 = 0;
   _fx_ri curr_cm_idx_ref_0 = 0;
   _fx_FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t fold_n_cvt_kexp_0 = {0};
   _fx_FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t fold_n_cvt_ktyp_0 = {0};
   _fx_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t v_0 = 0;
   _fx_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t v_1 = 0;
   _fx_R22K_form__k_fold_callb_t fold_n_cvt_callb_0 = {0};
   _fx_LN15C_form__cstmt_t v_2 = 0;
   _fx_LN15C_form__cstmt_t v_3 = 0;
   _fx_LN15C_form__cstmt_t v_4 = 0;
   int fx_status = 0;
   FX_CALL(_fx_make_rLN15C_form__cstmt_t(0, &top_fwd_decl_ref_0), _fx_cleanup);
   FX_CALL(_fx_make_rLN15C_form__cstmt_t(0, &top_typ_decl_ref_0), _fx_cleanup);
   FX_CALL(_fx_make_rLN15C_form__cstmt_t(0, &top_typfun_decl_ref_0), _fx_cleanup);
   FX_CALL(_fx_make_rRt6Set__t1R9Ast__id_t(&_fx_g16Ast__empty_idset, &all_decls_ref_0), _fx_cleanup);
   FX_CALL(_fx_make_rRt6Set__t1R9Ast__id_t(&_fx_g16Ast__empty_idset, &all_fwd_decls_ref_0), _fx_cleanup);
   FX_CALL(_fx_make_rRt6Set__t1R9Ast__id_t(&_fx_g16Ast__empty_idset, &all_visited_ref_0), _fx_cleanup);
   _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_id_fp_0 = { _fx_M3AstFM6cmp_idi2RM4id_tRM4id_t, 0 };
   FX_COPY_FP(&cmp_id_fp_0, &cmp_id_0);
   FX_CALL(
      _fx_M11C_gen_typesFM5emptyRt6Map__t2R9Ast__id_tRM16ctyp_temp_info_t1FPi2R9Ast__id_tR9Ast__id_t(&cmp_id_0,
         &all_saved_rec_vars_arg_0, 0), _fx_cleanup);
   FX_CALL(
      _fx_make_rRt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&all_saved_rec_vars_arg_0, &all_saved_rec_vars_ref_0),
      _fx_cleanup);
   _fx_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t* all_saved_rec_vars_0 = &all_saved_rec_vars_ref_0->data;
   FX_CALL(_fx_make_ri(-1, &curr_cm_idx_ref_0), _fx_cleanup);
   int_* curr_cm_idx_0 = &curr_cm_idx_ref_0->data;
   _fx_M11C_gen_typesFM7make_fpFPv2N14K_form__kexp_tR22K_form__k_fold_callb_t8rRt6Set__t1R9Ast__id_trRt6Set__t1R9Ast__id_trRt6Map__t2R9Ast__id_tRM16ctyp_temp_info_trRt6Set__t1R9Ast__id_trirLN15C_form__cstmt_trLN15C_form__cstmt_trLN15C_form__cstmt_t(
      all_decls_ref_0, all_fwd_decls_ref_0, all_saved_rec_vars_ref_0, all_visited_ref_0, curr_cm_idx_ref_0, top_fwd_decl_ref_0,
      top_typ_decl_ref_0, top_typfun_decl_ref_0, &fold_n_cvt_kexp_0);
   _fx_FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t fold_n_cvt_ktyp_fp_0 =
      { _fx_M11C_gen_typesFM15fold_n_cvt_ktypv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t, 0 };
   FX_COPY_FP(&fold_n_cvt_ktyp_fp_0, &fold_n_cvt_ktyp_0);
   FX_CALL(
      _fx_M11C_gen_typesFM4SomeNt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t(
         &fold_n_cvt_ktyp_0, &v_0), _fx_cleanup);
   FX_CALL(
      _fx_M11C_gen_typesFM4SomeNt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t(
         &fold_n_cvt_kexp_0, &v_1), _fx_cleanup);
   _fx_make_R22K_form__k_fold_callb_t(v_0, v_1, _fx_g19C_gen_types__None4_, &fold_n_cvt_callb_0);
   _fx_LR17K_form__kmodule_t lst_0 = kmods_0;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_LN14K_form__kexp_t km_top_0 = 0;
      _fx_R17K_form__kmodule_t* __pat___0 = &lst_0->hd;
      FX_COPY_PTR(__pat___0->km_top, &km_top_0);
      *curr_cm_idx_0 = __pat___0->km_idx;
      _fx_LN14K_form__kexp_t lst_1 = km_top_0;
      for (; lst_1; lst_1 = lst_1->tl) {
         _fx_N14K_form__kexp_t e_0 = lst_1->hd;
         if (FX_REC_VARIANT_TAG(e_0) == 34) {
            _fx_R21K_form__kdefvariant_t v_5 = {0};
            _fx_R29C_gen_types__ctyp_temp_info_t i_0 = {0};
            _fx_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t v_6 = {0};
            _fx_copy_R21K_form__kdefvariant_t(&e_0->u.KDefVariant->data, &v_5);
            _fx_R9Ast__id_t* kvar_name_0 = &v_5.kvar_name;
            if (v_5.kvar_flags.var_flag_recursive) {
               FX_CALL(
                  _fx_M11C_gen_typesFM16create_ctyp_declRM16ctyp_temp_info_t6R9Ast__id_tBR10Ast__loc_trRt6Set__t1R9Ast__id_trirLN15C_form__cstmt_t(
                     kvar_name_0, true, &v_5.kvar_loc, all_fwd_decls_ref_0, curr_cm_idx_ref_0, top_fwd_decl_ref_0, &i_0, 0),
                  _fx_catch_0);
               FX_CALL(
                  _fx_M11C_gen_typesFM3addRt6Map__t2R9Ast__id_tRM16ctyp_temp_info_t3Rt6Map__t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_tRM16ctyp_temp_info_t(
                     all_saved_rec_vars_0, kvar_name_0, &i_0, &v_6, 0), _fx_catch_0);
               _fx_free_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(all_saved_rec_vars_0);
               _fx_copy_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&v_6, all_saved_rec_vars_0);
            }

         _fx_catch_0: ;
            _fx_free_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&v_6);
            _fx_free_R29C_gen_types__ctyp_temp_info_t(&i_0);
            _fx_free_R21K_form__kdefvariant_t(&v_5);
         }
         FX_CHECK_EXN(_fx_catch_1);

      _fx_catch_1: ;
         FX_CHECK_EXN(_fx_catch_2);
      }

   _fx_catch_2: ;
      if (km_top_0) {
         _fx_free_LN14K_form__kexp_t(&km_top_0);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }
   _fx_LR17K_form__kmodule_t lst_2 = kmods_0;
   for (; lst_2; lst_2 = lst_2->tl) {
      _fx_LN14K_form__kexp_t km_top_1 = 0;
      _fx_R17K_form__kmodule_t* __pat___1 = &lst_2->hd;
      FX_COPY_PTR(__pat___1->km_top, &km_top_1);
      *curr_cm_idx_0 = __pat___1->km_idx;
      _fx_LN14K_form__kexp_t lst_3 = km_top_1;
      for (; lst_3; lst_3 = lst_3->tl) {
         _fx_N14K_form__kexp_t e_1 = lst_3->hd;
         FX_CALL(fold_n_cvt_kexp_0.fp(e_1, &fold_n_cvt_callb_0, fold_n_cvt_kexp_0.fcv), _fx_catch_3);

      _fx_catch_3: ;
         FX_CHECK_EXN(_fx_catch_4);
      }

   _fx_catch_4: ;
      if (km_top_1) {
         _fx_free_LN14K_form__kexp_t(&km_top_1);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }
   FX_CALL(_fx_M11C_gen_typesFM3revLN15C_form__cstmt_t1LN15C_form__cstmt_t(top_fwd_decl_ref_0->data, &v_2, 0), _fx_cleanup);
   FX_CALL(_fx_M11C_gen_typesFM3revLN15C_form__cstmt_t1LN15C_form__cstmt_t(top_typ_decl_ref_0->data, &v_3, 0), _fx_cleanup);
   FX_CALL(_fx_M11C_gen_typesFM3revLN15C_form__cstmt_t1LN15C_form__cstmt_t(top_typfun_decl_ref_0->data, &v_4, 0), _fx_cleanup);
   _fx_make_Ta3LN15C_form__cstmt_t(v_2, v_3, v_4, fx_result);

_fx_cleanup: ;
   if (top_fwd_decl_ref_0) {
      _fx_free_rLN15C_form__cstmt_t(&top_fwd_decl_ref_0);
   }
   if (top_typ_decl_ref_0) {
      _fx_free_rLN15C_form__cstmt_t(&top_typ_decl_ref_0);
   }
   if (top_typfun_decl_ref_0) {
      _fx_free_rLN15C_form__cstmt_t(&top_typfun_decl_ref_0);
   }
   if (all_decls_ref_0) {
      _fx_free_rRt6Set__t1R9Ast__id_t(&all_decls_ref_0);
   }
   if (all_fwd_decls_ref_0) {
      _fx_free_rRt6Set__t1R9Ast__id_t(&all_fwd_decls_ref_0);
   }
   if (all_visited_ref_0) {
      _fx_free_rRt6Set__t1R9Ast__id_t(&all_visited_ref_0);
   }
   FX_FREE_FP(&cmp_id_0);
   _fx_free_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&all_saved_rec_vars_arg_0);
   if (all_saved_rec_vars_ref_0) {
      _fx_free_rRt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&all_saved_rec_vars_ref_0);
   }
   FX_FREE_REF_SIMPLE(&curr_cm_idx_ref_0);
   FX_FREE_FP(&fold_n_cvt_kexp_0);
   FX_FREE_FP(&fold_n_cvt_ktyp_0);
   if (v_0) {
      _fx_free_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t(&v_0);
   }
   if (v_1) {
      _fx_free_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t(&v_1);
   }
   _fx_free_R22K_form__k_fold_callb_t(&fold_n_cvt_callb_0);
   if (v_2) {
      _fx_free_LN15C_form__cstmt_t(&v_2);
   }
   if (v_3) {
      _fx_free_LN15C_form__cstmt_t(&v_3);
   }
   if (v_4) {
      _fx_free_LN15C_form__cstmt_t(&v_4);
   }
   return fx_status;
}

static int _fx_M11C_gen_typesFM12add_fwd_declv5R9Ast__id_tBN15C_form__cstmt_trRt6Set__t1R9Ast__id_trLN15C_form__cstmt_t(
   struct _fx_R9Ast__id_t* i_0,
   bool fwd_decl_0,
   struct _fx_N15C_form__cstmt_t_data_t* decl_0,
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* all_fwd_decls_ref_0,
   struct _fx_rLN15C_form__cstmt_t_data_t* top_fwd_decl_ref_0,
   void* fx_fv)
{
   _fx_Nt11Set__tree_t1R9Ast__id_t v_0 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t v_1 = {0};
   _fx_Nt11Set__tree_t1R9Ast__id_t t_0 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_0 = {0};
   _fx_Nt11Set__tree_t1R9Ast__id_t v_2 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t v_3 = {0};
   _fx_T2Nt11Set__tree_t1R9Ast__id_ti v_4 = {0};
   _fx_Nt11Set__tree_t1R9Ast__id_t t_1 = 0;
   _fx_T2Nt11Set__tree_t1R9Ast__id_tB v_5 = {0};
   _fx_Nt11Set__tree_t1R9Ast__id_t t_2 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t v_6 = {0};
   _fx_Rt6Set__t1R9Ast__id_t v_7 = {0};
   _fx_LN15C_form__cstmt_t v_8 = 0;
   int fx_status = 0;
   _fx_Rt6Set__t1R9Ast__id_t* all_fwd_decls_0 = &all_fwd_decls_ref_0->data;
   _fx_LN15C_form__cstmt_t* top_fwd_decl_0 = &top_fwd_decl_ref_0->data;
   bool res_0;
   FX_CALL(_fx_M3AstFM6__eq__B2RM4id_tRM4id_t(i_0, &_fx_g9Ast__noid, &res_0, 0), _fx_cleanup);
   if (!res_0) {
      FX_COPY_PTR(all_fwd_decls_0->root, &v_0);
      FX_COPY_FP(&all_fwd_decls_0->cmp, &v_1);
      bool result_0 = 0;
      FX_COPY_PTR(v_0, &t_0);
      _fx_R9Ast__id_t x_0 = *i_0;
      FX_COPY_FP(&v_1, &cmp_0);
      for (;;) {
         _fx_Nt11Set__tree_t1R9Ast__id_t t_3 = 0;
         _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_1 = {0};
         FX_COPY_PTR(t_0, &t_3);
         _fx_R9Ast__id_t x_1 = x_0;
         FX_COPY_FP(&cmp_0, &cmp_1);
         if ((t_3 != 0) + 1 == 2) {
            _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* vcase_0 = &t_3->u.Node;
            int_ c_0;
            FX_CALL(cmp_1.fp(&x_1, &vcase_0->t2, &c_0, cmp_1.fcv), _fx_catch_0);
            if (c_0 < 0) {
               _fx_Nt11Set__tree_t1R9Ast__id_t* l_0 = &vcase_0->t1;
               _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_0);
               FX_COPY_PTR(*l_0, &t_0);
               x_0 = x_1;
               FX_FREE_FP(&cmp_0);
               FX_COPY_FP(&cmp_1, &cmp_0);
            }
            else if (c_0 > 0) {
               _fx_Nt11Set__tree_t1R9Ast__id_t* r_0 = &vcase_0->t3;
               _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_0);
               FX_COPY_PTR(*r_0, &t_0);
               x_0 = x_1;
               FX_FREE_FP(&cmp_0);
               FX_COPY_FP(&cmp_1, &cmp_0);
            }
            else {
               result_0 = true; FX_BREAK(_fx_catch_0);
            }

         _fx_catch_0: ;
         }
         else {
            result_0 = false; FX_BREAK(_fx_catch_1);  _fx_catch_1: ;
         }
         FX_CHECK_EXN(_fx_catch_2);

      _fx_catch_2: ;
         FX_FREE_FP(&cmp_1);
         if (t_3) {
            _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_3);
         }
         FX_CHECK_BREAK();
         FX_CHECK_EXN(_fx_cleanup);
      }
      bool have_fwd_decl_0 = result_0;
      bool t_4;
      if (!have_fwd_decl_0) {
         t_4 = fwd_decl_0;
      }
      else {
         t_4 = false;
      }
      if (t_4) {
         FX_COPY_PTR(all_fwd_decls_0->root, &v_2);
         FX_COPY_FP(&all_fwd_decls_0->cmp, &v_3);
         FX_CALL(
            _fx_M11C_gen_typesFM12add_to_tree_T2Nt11Set__tree_t1R9Ast__id_ti3Nt11Set__tree_t1R9Ast__id_tR9Ast__id_tFPi2R9Ast__id_tR9Ast__id_t(
               v_2, i_0, &v_3, &v_4, 0), _fx_cleanup);
         FX_COPY_PTR(v_4.t0, &t_1);
         int_ dsz_0 = v_4.t1;
         if ((t_1 != 0) + 1 == 2) {
            _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* vcase_1 = &t_1->u.Node;
            if (vcase_1->t0.tag == 1) {
               _fx_Nt11Set__tree_t1R9Ast__id_t v_9 = 0;
               FX_CALL(
                  _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
                     &_fx_g20C_gen_types__Black1_, vcase_1->t1, &vcase_1->t2, vcase_1->t3, &v_9), _fx_catch_3);
               _fx_make_T2Nt11Set__tree_t1R9Ast__id_tB(v_9, false, &v_5);

            _fx_catch_3: ;
               if (v_9) {
                  _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_9);
               }
               goto _fx_endmatch_0;
            }
         }
         _fx_make_T2Nt11Set__tree_t1R9Ast__id_tB(t_1, true, &v_5);

      _fx_endmatch_0: ;
         FX_CHECK_EXN(_fx_cleanup);
         FX_COPY_PTR(v_5.t0, &t_2);
         FX_COPY_FP(&all_fwd_decls_0->cmp, &v_6);
         _fx_make_Rt6Set__t1R9Ast__id_t(t_2, all_fwd_decls_0->size + dsz_0, &v_6, &v_7);
         _fx_free_Rt6Set__t1R9Ast__id_t(all_fwd_decls_0);
         _fx_copy_Rt6Set__t1R9Ast__id_t(&v_7, all_fwd_decls_0);
         FX_CALL(_fx_cons_LN15C_form__cstmt_t(decl_0, *top_fwd_decl_0, true, &v_8), _fx_cleanup);
         _fx_free_LN15C_form__cstmt_t(top_fwd_decl_0);
         FX_COPY_PTR(v_8, top_fwd_decl_0);
      }
   }

_fx_cleanup: ;
   if (v_0) {
      _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_0);
   }
   FX_FREE_FP(&v_1);
   if (t_0) {
      _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_0);
   }
   FX_FREE_FP(&cmp_0);
   if (v_2) {
      _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_2);
   }
   FX_FREE_FP(&v_3);
   _fx_free_T2Nt11Set__tree_t1R9Ast__id_ti(&v_4);
   if (t_1) {
      _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_1);
   }
   _fx_free_T2Nt11Set__tree_t1R9Ast__id_tB(&v_5);
   if (t_2) {
      _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_2);
   }
   FX_FREE_FP(&v_6);
   _fx_free_Rt6Set__t1R9Ast__id_t(&v_7);
   if (v_8) {
      _fx_free_LN15C_form__cstmt_t(&v_8);
   }
   return fx_status;
}

static int
   _fx_M11C_gen_typesFM8add_declv5R9Ast__id_tN15C_form__cstmt_trRt6Set__t1R9Ast__id_trLN15C_form__cstmt_trLN15C_form__cstmt_t(
   struct _fx_R9Ast__id_t* i_0,
   struct _fx_N15C_form__cstmt_t_data_t* decl_0,
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* all_decls_ref_0,
   struct _fx_rLN15C_form__cstmt_t_data_t* top_typ_decl_ref_0,
   struct _fx_rLN15C_form__cstmt_t_data_t* top_typfun_decl_ref_0,
   void* fx_fv)
{
   _fx_Nt11Set__tree_t1R9Ast__id_t v_0 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t v_1 = {0};
   _fx_T2Nt11Set__tree_t1R9Ast__id_ti v_2 = {0};
   _fx_Nt11Set__tree_t1R9Ast__id_t t_0 = 0;
   _fx_T2Nt11Set__tree_t1R9Ast__id_tB v_3 = {0};
   _fx_Nt11Set__tree_t1R9Ast__id_t t_1 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t v_4 = {0};
   _fx_Rt6Set__t1R9Ast__id_t v_5 = {0};
   int fx_status = 0;
   _fx_Rt6Set__t1R9Ast__id_t* all_decls_0 = &all_decls_ref_0->data;
   _fx_LN15C_form__cstmt_t* top_typ_decl_0 = &top_typ_decl_ref_0->data;
   _fx_LN15C_form__cstmt_t* top_typfun_decl_0 = &top_typfun_decl_ref_0->data;
   bool res_0;
   FX_CALL(_fx_M3AstFM6__eq__B2RM4id_tRM4id_t(i_0, &_fx_g9Ast__noid, &res_0, 0), _fx_cleanup);
   if (!res_0) {
      FX_COPY_PTR(all_decls_0->root, &v_0);
      FX_COPY_FP(&all_decls_0->cmp, &v_1);
      FX_CALL(
         _fx_M11C_gen_typesFM12add_to_tree_T2Nt11Set__tree_t1R9Ast__id_ti3Nt11Set__tree_t1R9Ast__id_tR9Ast__id_tFPi2R9Ast__id_tR9Ast__id_t(
            v_0, i_0, &v_1, &v_2, 0), _fx_cleanup);
      FX_COPY_PTR(v_2.t0, &t_0);
      int_ dsz_0 = v_2.t1;
      if ((t_0 != 0) + 1 == 2) {
         _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* vcase_0 = &t_0->u.Node;
         if (vcase_0->t0.tag == 1) {
            _fx_Nt11Set__tree_t1R9Ast__id_t v_6 = 0;
            FX_CALL(
               _fx_M11C_gen_typesFM4NodeNt11Set__tree_t1R9Ast__id_t4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
                  &_fx_g20C_gen_types__Black1_, vcase_0->t1, &vcase_0->t2, vcase_0->t3, &v_6), _fx_catch_0);
            _fx_make_T2Nt11Set__tree_t1R9Ast__id_tB(v_6, false, &v_3);

         _fx_catch_0: ;
            if (v_6) {
               _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_6);
            }
            goto _fx_endmatch_0;
         }
      }
      _fx_make_T2Nt11Set__tree_t1R9Ast__id_tB(t_0, true, &v_3);

   _fx_endmatch_0: ;
      FX_CHECK_EXN(_fx_cleanup);
      FX_COPY_PTR(v_3.t0, &t_1);
      FX_COPY_FP(&all_decls_0->cmp, &v_4);
      _fx_make_Rt6Set__t1R9Ast__id_t(t_1, all_decls_0->size + dsz_0, &v_4, &v_5);
      _fx_free_Rt6Set__t1R9Ast__id_t(all_decls_0);
      _fx_copy_Rt6Set__t1R9Ast__id_t(&v_5, all_decls_0);
      if (FX_REC_VARIANT_TAG(decl_0) == 17) {
         _fx_LN15C_form__cstmt_t v_7 = 0;
         FX_CALL(_fx_cons_LN15C_form__cstmt_t(decl_0, *top_typfun_decl_0, true, &v_7), _fx_catch_1);
         _fx_free_LN15C_form__cstmt_t(top_typfun_decl_0);
         FX_COPY_PTR(v_7, top_typfun_decl_0);

      _fx_catch_1: ;
         if (v_7) {
            _fx_free_LN15C_form__cstmt_t(&v_7);
         }
      }
      else {
         _fx_LN15C_form__cstmt_t v_8 = 0;
         FX_CALL(_fx_cons_LN15C_form__cstmt_t(decl_0, *top_typ_decl_0, true, &v_8), _fx_catch_2);
         _fx_free_LN15C_form__cstmt_t(top_typ_decl_0);
         FX_COPY_PTR(v_8, top_typ_decl_0);

      _fx_catch_2: ;
         if (v_8) {
            _fx_free_LN15C_form__cstmt_t(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
   }

_fx_cleanup: ;
   if (v_0) {
      _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_0);
   }
   FX_FREE_FP(&v_1);
   _fx_free_T2Nt11Set__tree_t1R9Ast__id_ti(&v_2);
   if (t_0) {
      _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_0);
   }
   _fx_free_T2Nt11Set__tree_t1R9Ast__id_tB(&v_3);
   if (t_1) {
      _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_1);
   }
   FX_FREE_FP(&v_4);
   _fx_free_Rt6Set__t1R9Ast__id_t(&v_5);
   return fx_status;
}

static int
   _fx_M11C_gen_typesFM16create_ctyp_declRM16ctyp_temp_info_t6R9Ast__id_tBR10Ast__loc_trRt6Set__t1R9Ast__id_trirLN15C_form__cstmt_t(
   struct _fx_R9Ast__id_t* tn_0,
   bool fwd_decl_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* all_fwd_decls_ref_0,
   struct _fx_ri_data_t* curr_cm_idx_ref_0,
   struct _fx_rLN15C_form__cstmt_t_data_t* top_fwd_decl_ref_0,
   struct _fx_R29C_gen_types__ctyp_temp_info_t* fx_result,
   void* fx_fv)
{
   _fx_N14K_form__ktyp_t v_0 = 0;
   fx_str_t cname_0 = {0};
   fx_str_t v_1 = {0};
   _fx_N14C_form__ctyp_t struct_typ_0 = 0;
   _fx_N14C_form__ctyp_t struct_or_ptr_typ_0 = 0;
   _fx_R17C_form__ctprops_t v_2 = {0};
   _fx_R17C_form__cdeftyp_t v_3 = {0};
   _fx_rR17C_form__cdeftyp_t struct_decl_0 = 0;
   _fx_N14C_form__ctyp_t ctyp_0 = 0;
   _fx_N14C_form__ctyp_t dst_typ_0 = 0;
   _fx_T2N14C_form__ctyp_tLN19C_form__carg_attr_t v_4 = {0};
   _fx_N14C_form__ctyp_t v_5 = 0;
   _fx_LN19C_form__carg_attr_t v_6 = 0;
   _fx_N14C_form__ctyp_t src_typ_0 = 0;
   _fx_LN19C_form__carg_attr_t src_flags_0 = 0;
   _fx_N14C_form__cexp_t src_exp_0 = 0;
   _fx_N14C_form__cexp_t dst_exp_0 = 0;
   fx_str_t cname_wo_prefix_0 = {0};
   fx_str_t v_7 = {0};
   _fx_LN19C_form__carg_attr_t v_8 = 0;
   _fx_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t v_9 = {0};
   _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t v_10 = 0;
   _fx_R17C_form__cdeffun_t v_11 = {0};
   _fx_rR17C_form__cdeffun_t freef_decl_0 = 0;
   fx_str_t v_12 = {0};
   _fx_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t v_13 = {0};
   _fx_LN19C_form__carg_attr_t v_14 = 0;
   _fx_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t v_15 = {0};
   _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t v_16 = 0;
   _fx_R17C_form__cdeffun_t v_17 = {0};
   _fx_rR17C_form__cdeffun_t copyf_decl_0 = 0;
   _fx_N15C_form__cinfo_t v_18 = {0};
   _fx_N15C_form__cstmt_t v_19 = 0;
   _fx_N15C_form__cinfo_t v_20 = {0};
   _fx_N15C_form__cstmt_t v_21 = 0;
   _fx_N15C_form__cinfo_t v_22 = {0};
   _fx_N15C_form__cstmt_t v_23 = 0;
   int fx_status = 0;
   int_* curr_cm_idx_0 = &curr_cm_idx_ref_0->data;
   FX_CALL(_fx_M6K_formFM8KTypNameN14K_form__ktyp_t1R9Ast__id_t(tn_0, &v_0), _fx_cleanup);
   _fx_R17K_form__ktprops_t ktp_0;
   FX_CALL(_fx_M10K_annotateFM11get_ktpropsR17K_form__ktprops_t2N14K_form__ktyp_tR10Ast__loc_t(v_0, loc_0, &ktp_0, 0),
      _fx_cleanup);
   bool ktp_custom_copy_0 = ktp_0.ktp_custom_copy;
   bool ktp_custom_free_0 = ktp_0.ktp_custom_free;
   bool ktp_pass_by_ref_0 = ktp_0.ktp_pass_by_ref;
   bool ktp_ptr_0 = ktp_0.ktp_ptr;
   _fx_Ta2R9Ast__id_t v_24;
   if (ktp_custom_free_0) {
      _fx_R9Ast__id_t v_25;
      fx_str_t slit_0 = FX_MAKE_STR("free");
      FX_CALL(_fx_M6C_formFM7gen_idcR9Ast__id_t2iS(*curr_cm_idx_0, &slit_0, &v_25, 0), _fx_cleanup);
      _fx_Ta2R9Ast__id_t tup_0 = { _fx_g9Ast__noid, v_25 };
      v_24 = tup_0;
   }
   else {
      _fx_Ta2R9Ast__id_t tup_1 = { _fx_g9Ast__noid, _fx_g9Ast__noid }; v_24 = tup_1;
   }
   _fx_R9Ast__id_t free_m_0 = v_24.t0;
   _fx_R9Ast__id_t free_f_0 = v_24.t1;
   _fx_Ta2R9Ast__id_t v_26;
   if (ktp_custom_copy_0) {
      _fx_R9Ast__id_t v_27;
      fx_str_t slit_1 = FX_MAKE_STR("copy");
      FX_CALL(_fx_M6C_formFM7gen_idcR9Ast__id_t2iS(*curr_cm_idx_0, &slit_1, &v_27, 0), _fx_cleanup);
      _fx_Ta2R9Ast__id_t tup_2 = { _fx_g9Ast__noid, v_27 };
      v_26 = tup_2;
   }
   else if (ktp_ptr_0) {
      _fx_Ta2R9Ast__id_t tup_3 = { _fx_g23C_form__std_FX_COPY_PTR, _fx_g23C_form__std_fx_copy_ptr }; v_26 = tup_3;
   }
   else {
      _fx_Ta2R9Ast__id_t tup_4 = { _fx_g9Ast__noid, _fx_g9Ast__noid }; v_26 = tup_4;
   }
   _fx_R9Ast__id_t copy_m_0 = v_26.t0;
   _fx_R9Ast__id_t copy_f_0 = v_26.t1;
   FX_CALL(_fx_M6K_formFM13get_idk_cnameS2R9Ast__id_tR10Ast__loc_t(tn_0, loc_0, &cname_0, 0), _fx_cleanup);
   _fx_R9Ast__id_t struct_id_0;
   if (ktp_ptr_0) {
      fx_str_t slit_2 = FX_MAKE_STR("_data_t");
      {
         const fx_str_t strs_0[] = { cname_0, slit_2 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 2, &v_1), _fx_cleanup);
      }
      FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&v_1, &struct_id_0, 0), _fx_cleanup);
   }
   else {
      struct_id_0 = *tn_0;
   }
   _fx_Nt6option1R9Ast__id_t v_28;
   _fx_M11C_gen_typesFM4SomeNt6option1R9Ast__id_t1R9Ast__id_t(&struct_id_0, &v_28);
   FX_CALL(
      _fx_M6C_formFM10CTypStructN14C_form__ctyp_t2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t(&v_28, 0, &struct_typ_0),
      _fx_cleanup);
   if (ktp_ptr_0) {
      FX_CALL(_fx_M6C_formFM8make_ptrN14C_form__ctyp_t1N14C_form__ctyp_t(struct_typ_0, &struct_or_ptr_typ_0, 0), _fx_cleanup);
   }
   else {
      FX_COPY_PTR(struct_typ_0, &struct_or_ptr_typ_0);
   }
   bool t_0;
   if (ktp_custom_free_0) {
      t_0 = true;
   }
   else {
      t_0 = ktp_custom_copy_0;
   }
   _fx_Ta2R9Ast__id_t v_29 = { free_m_0, free_f_0 };
   _fx_Ta2R9Ast__id_t v_30 = { copy_m_0, copy_f_0 };
   _fx_make_R17C_form__ctprops_t(false, t_0, ktp_ptr_0, ktp_pass_by_ref_0, 0, &v_29, &v_30, &v_2);
   _fx_make_R17C_form__cdeftyp_t(tn_0, struct_or_ptr_typ_0, &cname_0, &v_2, 0, &_fx_g9Ast__noid, 0, &_fx_g9Ast__noid, 0, loc_0,
      &v_3);
   FX_CALL(_fx_make_rR17C_form__cdeftyp_t(&v_3, &struct_decl_0), _fx_cleanup);
   FX_CALL(_fx_M6C_formFM8CTypNameN14C_form__ctyp_t1R9Ast__id_t(tn_0, &ctyp_0), _fx_cleanup);
   FX_CALL(_fx_M6C_formFM8make_ptrN14C_form__ctyp_t1N14C_form__ctyp_t(ctyp_0, &dst_typ_0, 0), _fx_cleanup);
   if (ktp_pass_by_ref_0) {
      FX_CALL(_fx_M6C_formFM14make_const_ptrN14C_form__ctyp_t1N14C_form__ctyp_t(ctyp_0, &v_5, 0), _fx_cleanup);
      FX_CALL(_fx_cons_LN19C_form__carg_attr_t(&_fx_g26C_gen_types__CArgPassByPtr, 0, true, &v_6), _fx_cleanup);
      _fx_make_T2N14C_form__ctyp_tLN19C_form__carg_attr_t(v_5, v_6, &v_4);
   }
   else {
      _fx_make_T2N14C_form__ctyp_tLN19C_form__carg_attr_t(ctyp_0, 0, &v_4);
   }
   FX_COPY_PTR(v_4.t0, &src_typ_0);
   FX_COPY_PTR(v_4.t1, &src_flags_0);
   _fx_R9Ast__id_t src_id_0;
   fx_str_t slit_3 = FX_MAKE_STR("src");
   FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&slit_3, &src_id_0, 0), _fx_cleanup);
   _fx_R9Ast__id_t dst_id_0;
   fx_str_t slit_4 = FX_MAKE_STR("dst");
   FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&slit_4, &dst_id_0, 0), _fx_cleanup);
   FX_CALL(
      _fx_M6C_formFM13make_id_t_expN14C_form__cexp_t3R9Ast__id_tN14C_form__ctyp_tR10Ast__loc_t(&src_id_0, src_typ_0, loc_0,
         &src_exp_0, 0), _fx_cleanup);
   FX_CALL(
      _fx_M6C_formFM13make_id_t_expN14C_form__cexp_t3R9Ast__id_tN14C_form__ctyp_tR10Ast__loc_t(&dst_id_0, dst_typ_0, loc_0,
         &dst_exp_0, 0), _fx_cleanup);
   FX_CALL(_fx_M8K_mangleFM9remove_fxS1S(&cname_0, &cname_wo_prefix_0, 0), _fx_cleanup);
   fx_str_t slit_5 = FX_MAKE_STR("_fx_free_");
   {
      const fx_str_t strs_1[] = { slit_5, cname_wo_prefix_0 };
      FX_CALL(fx_strjoin(0, 0, 0, strs_1, 2, &v_7), _fx_cleanup);
   }
   FX_CALL(_fx_cons_LN19C_form__carg_attr_t(&_fx_g26C_gen_types__CArgPassByPtr, 0, true, &v_8), _fx_cleanup);
   _fx_make_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&dst_id_0, dst_typ_0, v_8, &v_9);
   FX_CALL(_fx_cons_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_9, 0, true, &v_10), _fx_cleanup);
   _fx_R16Ast__fun_flags_t v_31;
   FX_CALL(_fx_M3AstFM17default_fun_flagsRM11fun_flags_t0(&v_31, 0), _fx_cleanup);
   _fx_R16Ast__fun_flags_t v_32 =
      { v_31.fun_flag_pure, v_31.fun_flag_ccode, v_31.fun_flag_have_keywords, v_31.fun_flag_inline, true,
         v_31.fun_flag_really_nothrow, true, v_31.fun_flag_ctor, v_31.fun_flag_method_of, v_31.fun_flag_uses_fv,
         v_31.fun_flag_recursive, v_31.fun_flag_instance };
   _fx_make_R17C_form__cdeffun_t(&free_f_0, &v_7, v_10, _fx_g21C_gen_types__CTypVoid, 0, &v_32, 0, loc_0, &v_11);
   FX_CALL(_fx_make_rR17C_form__cdeffun_t(&v_11, &freef_decl_0), _fx_cleanup);
   _fx_R17C_form__cdeffun_t* v_33 = &freef_decl_0->data;
   fx_str_t slit_6 = FX_MAKE_STR("_fx_copy_");
   {
      const fx_str_t strs_2[] = { slit_6, cname_wo_prefix_0 };
      FX_CALL(fx_strjoin(0, 0, 0, strs_2, 2, &v_12), _fx_cleanup);
   }
   _fx_make_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&src_id_0, src_typ_0, src_flags_0, &v_13);
   FX_CALL(_fx_cons_LN19C_form__carg_attr_t(&_fx_g26C_gen_types__CArgPassByPtr, 0, true, &v_14), _fx_cleanup);
   _fx_make_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&dst_id_0, dst_typ_0, v_14, &v_15);
   FX_CALL(_fx_cons_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_15, 0, true, &v_16), _fx_cleanup);
   FX_CALL(_fx_cons_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_13, v_16, false, &v_16), _fx_cleanup);
   _fx_make_R17C_form__cdeffun_t(&copy_f_0, &v_12, v_16, _fx_g21C_gen_types__CTypVoid, v_33->cf_body, &v_33->cf_flags,
      v_33->cf_scope, &v_33->cf_loc, &v_17);
   FX_CALL(_fx_make_rR17C_form__cdeffun_t(&v_17, &copyf_decl_0), _fx_cleanup);
   _fx_M6C_formFM4CTypN15C_form__cinfo_t1rRM9cdeftyp_t(struct_decl_0, &v_18);
   FX_CALL(_fx_M6C_formFM13set_idc_entryv2R9Ast__id_tN15C_form__cinfo_t(tn_0, &v_18, 0), _fx_cleanup);
   if (ktp_ptr_0) {
      FX_CALL(_fx_M6C_formFM14CDefForwardTypN15C_form__cstmt_t2R9Ast__id_tR10Ast__loc_t(&struct_id_0, loc_0, &v_19),
         _fx_cleanup);
      FX_CALL(
         _fx_M11C_gen_typesFM12add_fwd_declv5R9Ast__id_tBN15C_form__cstmt_trRt6Set__t1R9Ast__id_trLN15C_form__cstmt_t(tn_0,
            fwd_decl_0, v_19, all_fwd_decls_ref_0, top_fwd_decl_ref_0, 0), _fx_cleanup);
   }
   if (ktp_custom_free_0) {
      _fx_M6C_formFM4CFunN15C_form__cinfo_t1rRM9cdeffun_t(freef_decl_0, &v_20);
      FX_CALL(_fx_M6C_formFM13set_idc_entryv2R9Ast__id_tN15C_form__cinfo_t(&free_f_0, &v_20, 0), _fx_cleanup);
      FX_CALL(_fx_M6C_formFM14CDefForwardSymN15C_form__cstmt_t2R9Ast__id_tR10Ast__loc_t(&free_f_0, loc_0, &v_21), _fx_cleanup);
      FX_CALL(
         _fx_M11C_gen_typesFM12add_fwd_declv5R9Ast__id_tBN15C_form__cstmt_trRt6Set__t1R9Ast__id_trLN15C_form__cstmt_t(&free_f_0,
            fwd_decl_0, v_21, all_fwd_decls_ref_0, top_fwd_decl_ref_0, 0), _fx_cleanup);
   }
   if (ktp_custom_copy_0) {
      _fx_M6C_formFM4CFunN15C_form__cinfo_t1rRM9cdeffun_t(copyf_decl_0, &v_22);
      FX_CALL(_fx_M6C_formFM13set_idc_entryv2R9Ast__id_tN15C_form__cinfo_t(&copy_f_0, &v_22, 0), _fx_cleanup);
      FX_CALL(_fx_M6C_formFM14CDefForwardSymN15C_form__cstmt_t2R9Ast__id_tR10Ast__loc_t(&copy_f_0, loc_0, &v_23), _fx_cleanup);
      FX_CALL(
         _fx_M11C_gen_typesFM12add_fwd_declv5R9Ast__id_tBN15C_form__cstmt_trRt6Set__t1R9Ast__id_trLN15C_form__cstmt_t(&copy_f_0,
            fwd_decl_0, v_23, all_fwd_decls_ref_0, top_fwd_decl_ref_0, 0), _fx_cleanup);
   }
   _fx_make_R29C_gen_types__ctyp_temp_info_t(struct_decl_0, freef_decl_0, copyf_decl_0, src_exp_0, dst_exp_0,
      &cname_wo_prefix_0, fx_result);

_fx_cleanup: ;
   if (v_0) {
      _fx_free_N14K_form__ktyp_t(&v_0);
   }
   FX_FREE_STR(&cname_0);
   FX_FREE_STR(&v_1);
   if (struct_typ_0) {
      _fx_free_N14C_form__ctyp_t(&struct_typ_0);
   }
   if (struct_or_ptr_typ_0) {
      _fx_free_N14C_form__ctyp_t(&struct_or_ptr_typ_0);
   }
   _fx_free_R17C_form__ctprops_t(&v_2);
   _fx_free_R17C_form__cdeftyp_t(&v_3);
   if (struct_decl_0) {
      _fx_free_rR17C_form__cdeftyp_t(&struct_decl_0);
   }
   if (ctyp_0) {
      _fx_free_N14C_form__ctyp_t(&ctyp_0);
   }
   if (dst_typ_0) {
      _fx_free_N14C_form__ctyp_t(&dst_typ_0);
   }
   _fx_free_T2N14C_form__ctyp_tLN19C_form__carg_attr_t(&v_4);
   if (v_5) {
      _fx_free_N14C_form__ctyp_t(&v_5);
   }
   FX_FREE_LIST_SIMPLE(&v_6);
   if (src_typ_0) {
      _fx_free_N14C_form__ctyp_t(&src_typ_0);
   }
   FX_FREE_LIST_SIMPLE(&src_flags_0);
   if (src_exp_0) {
      _fx_free_N14C_form__cexp_t(&src_exp_0);
   }
   if (dst_exp_0) {
      _fx_free_N14C_form__cexp_t(&dst_exp_0);
   }
   FX_FREE_STR(&cname_wo_prefix_0);
   FX_FREE_STR(&v_7);
   FX_FREE_LIST_SIMPLE(&v_8);
   _fx_free_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_9);
   if (v_10) {
      _fx_free_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_10);
   }
   _fx_free_R17C_form__cdeffun_t(&v_11);
   if (freef_decl_0) {
      _fx_free_rR17C_form__cdeffun_t(&freef_decl_0);
   }
   FX_FREE_STR(&v_12);
   _fx_free_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_13);
   FX_FREE_LIST_SIMPLE(&v_14);
   _fx_free_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_15);
   if (v_16) {
      _fx_free_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_16);
   }
   _fx_free_R17C_form__cdeffun_t(&v_17);
   if (copyf_decl_0) {
      _fx_free_rR17C_form__cdeffun_t(&copyf_decl_0);
   }
   _fx_free_N15C_form__cinfo_t(&v_18);
   if (v_19) {
      _fx_free_N15C_form__cstmt_t(&v_19);
   }
   _fx_free_N15C_form__cinfo_t(&v_20);
   if (v_21) {
      _fx_free_N15C_form__cstmt_t(&v_21);
   }
   _fx_free_N15C_form__cinfo_t(&v_22);
   if (v_23) {
      _fx_free_N15C_form__cstmt_t(&v_23);
   }
   return fx_status;
}

static int
   _fx_M11C_gen_typesFM9cvt2ctyp_v10R9Ast__id_tR10Ast__loc_trRt6Set__t1R9Ast__id_trRt6Set__t1R9Ast__id_trRt6Map__t2R9Ast__id_tRM16ctyp_temp_info_trRt6Set__t1R9Ast__id_trirLN15C_form__cstmt_trLN15C_form__cstmt_trLN15C_form__cstmt_t(
   struct _fx_R9Ast__id_t* tn_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* all_decls_ref_0,
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* all_fwd_decls_ref_0,
   struct _fx_rRt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t* all_saved_rec_vars_ref_0,
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* all_visited_ref_0,
   struct _fx_ri_data_t* curr_cm_idx_ref_0,
   struct _fx_rLN15C_form__cstmt_t_data_t* top_fwd_decl_ref_0,
   struct _fx_rLN15C_form__cstmt_t_data_t* top_typ_decl_ref_0,
   struct _fx_rLN15C_form__cstmt_t_data_t* top_typfun_decl_ref_0,
   void* fx_fv)
{
   _fx_Rt6Set__t1R9Ast__id_t deps_0 = {0};
   _fx_N15K_form__kinfo_t kt_info_0 = {0};
   _fx_T3BBRt6Set__t1R9Ast__id_t v_0 = {0};
   _fx_Rt6Set__t1R9Ast__id_t deps_1 = {0};
   _fx_Rt6Set__t1R9Ast__id_t v_1 = {0};
   _fx_N14K_form__ktyp_t v_2 = 0;
   _fx_N14C_form__cexp_t fx_result_exp_0 = 0;
   _fx_N14C_form__ctyp_t fx_result_ct_0 = 0;
   _fx_R29C_gen_types__ctyp_temp_info_t v_3 = {0};
   _fx_Nt6option1R29C_gen_types__ctyp_temp_info_t v_4 = {0};
   fx_str_t tp_cname_wo_prefix_0 = {0};
   _fx_N14C_form__cexp_t dst_exp_0 = 0;
   _fx_N14C_form__cexp_t src_exp_0 = 0;
   _fx_rR17C_form__cdeffun_t copyf_decl_0 = 0;
   _fx_rR17C_form__cdeffun_t freef_decl_0 = 0;
   _fx_rR17C_form__cdeftyp_t struct_decl_0 = 0;
   _fx_R17C_form__ctprops_t ct_props_0 = {0};
   _fx_R17C_form__cdeftyp_t v_5 = {0};
   _fx_T2N14C_form__ctyp_tNt6option1R9Ast__id_t v_6 = {0};
   _fx_N14C_form__ctyp_t struct_typ_0 = 0;
   _fx_Rt6Set__t1R9Ast__id_t v_7 = {0};
   _fx_FPv1R9Ast__id_t __lambda___0 = {0};
   int fx_status = 0;
   _fx_Rt6Set__t1R9Ast__id_t* all_decls_0 = &all_decls_ref_0->data;
   _fx_Rt6Set__t1R9Ast__id_t* all_visited_0 = &all_visited_ref_0->data;
   int_* curr_cm_idx_0 = &curr_cm_idx_ref_0->data;
   _fx_LN15C_form__cstmt_t* top_typ_decl_0 = &top_typ_decl_ref_0->data;
   bool visited_0;
   FX_CALL(_fx_M11C_gen_typesFM3memB2Rt6Set__t1R9Ast__id_tR9Ast__id_t(all_visited_0, tn_0, &visited_0, 0), _fx_cleanup);
   FX_CALL(_fx_M10K_annotateFM12get_typ_depsRt6Set__t1R9Ast__id_t2R9Ast__id_tR10Ast__loc_t(tn_0, loc_0, &deps_0, 0),
      _fx_cleanup);
   FX_CALL(_fx_M6K_formFM6kinfo_N15K_form__kinfo_t2R9Ast__id_tR10Ast__loc_t(tn_0, loc_0, &kt_info_0, 0), _fx_cleanup);
   if (kt_info_0.tag == 5) {
      _fx_FPB1R9Ast__id_t __lambda___1 = {0};
      _fx_Rt6Set__t1R9Ast__id_t v_8 = {0};
      _fx_R16Ast__var_flags_t kvar_flags_0 = kt_info_0.u.KVariant->data.kvar_flags;
      if (kvar_flags_0.var_flag_recursive) {
         bool v_9;
         FX_CALL(_fx_M11C_gen_typesFM3memB2Rt6Set__t1R9Ast__id_tR9Ast__id_t(&all_fwd_decls_ref_0->data, tn_0, &v_9, 0),
            _fx_catch_0);
         bool fwd_decl_0 = !v_9;
         _fx_M11C_gen_typesFM7make_fpFPB1R9Ast__id_t1R9Ast__id_t(tn_0, &__lambda___1);
         FX_CALL(
            _fx_M11C_gen_typesFM6filterRt6Set__t1R9Ast__id_t2Rt6Set__t1R9Ast__id_tFPB1R9Ast__id_t(&deps_0, &__lambda___1, &v_8,
               0), _fx_catch_0);
         _fx_make_T3BBRt6Set__t1R9Ast__id_t(true, fwd_decl_0, &v_8, &v_0);
      }
      else {
         _fx_make_T3BBRt6Set__t1R9Ast__id_t(false, false, &deps_0, &v_0);
      }

   _fx_catch_0: ;
      _fx_free_Rt6Set__t1R9Ast__id_t(&v_8);
      FX_FREE_FP(&__lambda___1);
   }
   else {
      _fx_make_T3BBRt6Set__t1R9Ast__id_t(false, false, &deps_0, &v_0);
   }
   FX_CHECK_EXN(_fx_cleanup);
   bool recursive_variant_0 = v_0.t0;
   bool fwd_decl_1 = v_0.t1;
   _fx_copy_Rt6Set__t1R9Ast__id_t(&v_0.t2, &deps_1);
   if (visited_0 == true) {
      if (recursive_variant_0 == false) {
         fx_str_t v_10 = {0};
         fx_str_t v_11 = {0};
         fx_str_t v_12 = {0};
         fx_exn_t v_13 = {0};
         FX_CALL(_fx_M6K_formFM7idk2strS2R9Ast__id_tR10Ast__loc_t(tn_0, loc_0, &v_10, 0), _fx_catch_1);
         FX_CALL(_fx_M11C_gen_typesFM6stringS1S(&v_10, &v_11, 0), _fx_catch_1);
         fx_str_t slit_0 = FX_MAKE_STR("non-recursive variant type \'");
         fx_str_t slit_1 = FX_MAKE_STR("\' references itself directly or indirectly");
         {
            const fx_str_t strs_0[] = { slit_0, v_11, slit_1 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_0, 3, &v_12), _fx_catch_1);
         }
         FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(loc_0, &v_12, &v_13, 0), _fx_catch_1);
         FX_THROW(&v_13, false, _fx_catch_1);

      _fx_catch_1: ;
         fx_free_exn(&v_13);
         FX_FREE_STR(&v_12);
         FX_FREE_STR(&v_11);
         FX_FREE_STR(&v_10);
         goto _fx_endmatch_0;
      }
   }

_fx_endmatch_0: ;
   FX_CHECK_EXN(_fx_cleanup);
   FX_CALL(_fx_M11C_gen_typesFM3addRt6Set__t1R9Ast__id_t2Rt6Set__t1R9Ast__id_tR9Ast__id_t(all_visited_0, tn_0, &v_1, 0),
      _fx_cleanup);
   _fx_free_Rt6Set__t1R9Ast__id_t(all_visited_0);
   _fx_copy_Rt6Set__t1R9Ast__id_t(&v_1, all_visited_0);
   FX_CALL(_fx_M6K_formFM8KTypNameN14K_form__ktyp_t1R9Ast__id_t(tn_0, &v_2), _fx_cleanup);
   _fx_R17K_form__ktprops_t ktp_0;
   FX_CALL(_fx_M10K_annotateFM11get_ktpropsR17K_form__ktprops_t2N14K_form__ktyp_tR10Ast__loc_t(v_2, loc_0, &ktp_0, 0),
      _fx_cleanup);
   _fx_R9Ast__id_t fx_result_id_0;
   fx_str_t slit_2 = FX_MAKE_STR("fx_result");
   FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&slit_2, &fx_result_id_0, 0), _fx_cleanup);
   FX_CALL(_fx_M6C_formFM11make_id_expN14C_form__cexp_t2R9Ast__id_tR10Ast__loc_t(&fx_result_id_0, loc_0, &fx_result_exp_0, 0),
      _fx_cleanup);
   FX_CALL(_fx_M6C_formFM8CTypNameN14C_form__ctyp_t1R9Ast__id_t(tn_0, &fx_result_ct_0), _fx_cleanup);
   if (!recursive_variant_0) {
      FX_CALL(
         _fx_M11C_gen_typesFM16create_ctyp_declRM16ctyp_temp_info_t6R9Ast__id_tBR10Ast__loc_trRt6Set__t1R9Ast__id_trirLN15C_form__cstmt_t(
            tn_0, fwd_decl_1, loc_0, all_fwd_decls_ref_0, curr_cm_idx_ref_0, top_fwd_decl_ref_0, &v_3, 0), _fx_cleanup);
   }
   else {
      FX_CALL(
         _fx_M11C_gen_typesFM8find_optNt6option1RM16ctyp_temp_info_t2Rt6Map__t2R9Ast__id_tRM16ctyp_temp_info_tR9Ast__id_t(
            &all_saved_rec_vars_ref_0->data, tn_0, &v_4, 0), _fx_cleanup);
      if (v_4.tag == 2) {
         _fx_copy_R29C_gen_types__ctyp_temp_info_t(&v_4.u.Some, &v_3);
      }
      else {
         fx_str_t v_14 = {0};
         fx_str_t v_15 = {0};
         fx_str_t v_16 = {0};
         fx_exn_t v_17 = {0};
         FX_CALL(_fx_M6K_formFM13get_idk_cnameS2R9Ast__id_tR10Ast__loc_t(tn_0, loc_0, &v_14, 0), _fx_catch_2);
         FX_CALL(_fx_M11C_gen_typesFM6stringS1S(&v_14, &v_15, 0), _fx_catch_2);
         fx_str_t slit_3 = FX_MAKE_STR("cgen: missing information about recursive variant \'");
         fx_str_t slit_4 = FX_MAKE_STR("\'");
         {
            const fx_str_t strs_1[] = { slit_3, v_15, slit_4 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_1, 3, &v_16), _fx_catch_2);
         }
         FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(loc_0, &v_16, &v_17, 0), _fx_catch_2);
         FX_THROW(&v_17, false, _fx_catch_2);

      _fx_catch_2: ;
         fx_free_exn(&v_17);
         FX_FREE_STR(&v_16);
         FX_FREE_STR(&v_15);
         FX_FREE_STR(&v_14);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }
   fx_copy_str(&v_3.ctti_cname_wo_prefix, &tp_cname_wo_prefix_0);
   FX_COPY_PTR(v_3.ctti_dst_exp, &dst_exp_0);
   FX_COPY_PTR(v_3.ctti_src_exp, &src_exp_0);
   FX_COPY_PTR(v_3.ctti_copyf_decl, &copyf_decl_0);
   FX_COPY_PTR(v_3.ctti_freef_decl, &freef_decl_0);
   FX_COPY_PTR(v_3.ctti_struct_decl, &struct_decl_0);
   _fx_R9Ast__id_t free_f_0 = freef_decl_0->data.cf_name;
   _fx_R9Ast__id_t copy_f_0 = copyf_decl_0->data.cf_name;
   _fx_copy_R17C_form__ctprops_t(&struct_decl_0->data.ct_props, &ct_props_0);
   _fx_copy_R17C_form__cdeftyp_t(&struct_decl_0->data, &v_5);
   _fx_N14C_form__ctyp_t v_18 = v_5.ct_typ;
   if (FX_REC_VARIANT_TAG(v_18) == 17) {
      _fx_N14C_form__ctyp_t a_struct_typ_0 = v_18->u.CTypRawPtr.t1;
      if (FX_REC_VARIANT_TAG(a_struct_typ_0) == 14) {
         _fx_N14C_form__ctyp_t struct_typ_1 = 0;
         _fx_Nt6option1R9Ast__id_t* struct_id_opt_0 = &a_struct_typ_0->u.CTypStruct.t0;
         if (struct_id_opt_0->tag == 2) {
            FX_CALL(_fx_M6C_formFM8CTypNameN14C_form__ctyp_t1R9Ast__id_t(&struct_id_opt_0->u.Some, &struct_typ_1), _fx_catch_3);

         _fx_catch_3: ;
         }
         else {
            FX_COPY_PTR(a_struct_typ_0, &struct_typ_1);
         }
         FX_CHECK_EXN(_fx_catch_4);
         _fx_make_T2N14C_form__ctyp_tNt6option1R9Ast__id_t(struct_typ_1, struct_id_opt_0, &v_6);

      _fx_catch_4: ;
         if (struct_typ_1) {
            _fx_free_N14C_form__ctyp_t(&struct_typ_1);
         }
         goto _fx_endmatch_1;
      }
   }
   _fx_N14C_form__ctyp_t v_19 = 0;
   FX_CALL(_fx_M6C_formFM8CTypNameN14C_form__ctyp_t1R9Ast__id_t(tn_0, &v_19), _fx_catch_5);
   _fx_Nt6option1R9Ast__id_t v_20;
   _fx_M11C_gen_typesFM4SomeNt6option1R9Ast__id_t1R9Ast__id_t(tn_0, &v_20);
   _fx_make_T2N14C_form__ctyp_tNt6option1R9Ast__id_t(v_19, &v_20, &v_6);

_fx_catch_5: ;
   if (v_19) {
      _fx_free_N14C_form__ctyp_t(&v_19);
   }

_fx_endmatch_1: ;
   FX_CHECK_EXN(_fx_cleanup);
   FX_COPY_PTR(v_6.t0, &struct_typ_0);
   _fx_Nt6option1R9Ast__id_t struct_id_opt_1 = v_6.t1;
   FX_CALL(_fx_M11C_gen_typesFM3addRt6Set__t1R9Ast__id_t2Rt6Set__t1R9Ast__id_tR9Ast__id_t(all_decls_0, tn_0, &v_7, 0),
      _fx_cleanup);
   _fx_free_Rt6Set__t1R9Ast__id_t(all_decls_0);
   _fx_copy_Rt6Set__t1R9Ast__id_t(&v_7, all_decls_0);
   _fx_M11C_gen_typesFM7make_fpFPv1R9Ast__id_t9rRt6Set__t1R9Ast__id_trRt6Set__t1R9Ast__id_trRt6Map__t2R9Ast__id_tRM16ctyp_temp_info_trRt6Set__t1R9Ast__id_triR10Ast__loc_trLN15C_form__cstmt_trLN15C_form__cstmt_trLN15C_form__cstmt_t(
      all_decls_ref_0, all_fwd_decls_ref_0, all_saved_rec_vars_ref_0, all_visited_ref_0, curr_cm_idx_ref_0, loc_0,
      top_fwd_decl_ref_0, top_typ_decl_ref_0, top_typfun_decl_ref_0, &__lambda___0);
   FX_CALL(_fx_M11C_gen_typesFM3appv2Rt6Set__t1R9Ast__id_tFPv1R9Ast__id_t(&deps_1, &__lambda___0, 0), _fx_cleanup);
   if (kt_info_0.tag == 7) {
      _fx_R23K_form__kdefinterface_t v_21 = {0};
      _fx_Rt6Set__t1R9Ast__id_t v_22 = {0};
      _fx_copy_R23K_form__kdefinterface_t(&kt_info_0.u.KInterface->data, &v_21);
      FX_CALL(
         _fx_M11C_gen_typesFM3addRt6Set__t1R9Ast__id_t2Rt6Set__t1R9Ast__id_tR9Ast__id_t(all_decls_0, &v_21.ki_name, &v_22, 0),
         _fx_catch_6);
      _fx_free_Rt6Set__t1R9Ast__id_t(all_decls_0);
      _fx_copy_Rt6Set__t1R9Ast__id_t(&v_22, all_decls_0);

   _fx_catch_6: ;
      _fx_free_Rt6Set__t1R9Ast__id_t(&v_22);
      _fx_free_R23K_form__kdefinterface_t(&v_21);
   }
   else {
      _fx_N15C_form__cstmt_t v_23 = 0;
      _fx_N15C_form__cstmt_t v_24 = 0;
      _fx_N15C_form__cstmt_t v_25 = 0;
      FX_CALL(_fx_M6C_formFM7CDefTypN15C_form__cstmt_t1rRM9cdeftyp_t(struct_decl_0, &v_23), _fx_catch_7);
      FX_CALL(
         _fx_M11C_gen_typesFM8add_declv5R9Ast__id_tN15C_form__cstmt_trRt6Set__t1R9Ast__id_trLN15C_form__cstmt_trLN15C_form__cstmt_t(
            tn_0, v_23, all_decls_ref_0, top_typ_decl_ref_0, top_typfun_decl_ref_0, 0), _fx_catch_7);
      if (ktp_0.ktp_custom_free) {
         FX_CALL(_fx_M6C_formFM7CDefFunN15C_form__cstmt_t1rRM9cdeffun_t(freef_decl_0, &v_24), _fx_catch_7);
         FX_CALL(
            _fx_M11C_gen_typesFM8add_declv5R9Ast__id_tN15C_form__cstmt_trRt6Set__t1R9Ast__id_trLN15C_form__cstmt_trLN15C_form__cstmt_t(
               &free_f_0, v_24, all_decls_ref_0, top_typ_decl_ref_0, top_typfun_decl_ref_0, 0), _fx_catch_7);
      }
      if (ktp_0.ktp_custom_copy) {
         FX_CALL(_fx_M6C_formFM7CDefFunN15C_form__cstmt_t1rRM9cdeffun_t(copyf_decl_0, &v_25), _fx_catch_7);
         FX_CALL(
            _fx_M11C_gen_typesFM8add_declv5R9Ast__id_tN15C_form__cstmt_trRt6Set__t1R9Ast__id_trLN15C_form__cstmt_trLN15C_form__cstmt_t(
               &copy_f_0, v_25, all_decls_ref_0, top_typ_decl_ref_0, top_typfun_decl_ref_0, 0), _fx_catch_7);
      }

   _fx_catch_7: ;
      if (v_25) {
         _fx_free_N15C_form__cstmt_t(&v_25);
      }
      if (v_24) {
         _fx_free_N15C_form__cstmt_t(&v_24);
      }
      if (v_23) {
         _fx_free_N15C_form__cstmt_t(&v_23);
      }
   }
   FX_CHECK_EXN(_fx_cleanup);
   int tag_0 = kt_info_0.tag;
   if (tag_0 == 8) {
      _fx_N14K_form__ktyp_t kt_typ_0 = 0;
      _fx_R17K_form__kdeftyp_t* v_26 = &kt_info_0.u.KTyp->data;
      _fx_R10Ast__loc_t kt_loc_0 = v_26->kt_loc;
      FX_COPY_PTR(v_26->kt_typ, &kt_typ_0);
      int tag_1 = FX_REC_VARIANT_TAG(kt_typ_0);
      if (tag_1 == 14) {
         _fx_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t
            __fold_result___0 = {0};
         _fx_LN14K_form__ktyp_t telems_0 = 0;
         _fx_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t
            v_27 = {0};
         _fx_LN15C_form__cstmt_t free_code_0 = 0;
         _fx_LN15C_form__cstmt_t copy_code_0 = 0;
         _fx_LN15C_form__cstmt_t make_code_0 = 0;
         _fx_LT2R9Ast__id_tN14C_form__ctyp_t relems_0 = 0;
         _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t make_args_0 = 0;
         _fx_LR9Ast__id_t mktupl_0 = 0;
         _fx_N14C_form__ctyp_t v_28 = 0;
         _fx_LN19C_form__carg_attr_t v_29 = 0;
         _fx_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t v_30 = {0};
         _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t make_args_1 = 0;
         fx_str_t v_31 = {0};
         _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t v_32 = 0;
         _fx_LN15C_form__cstmt_t v_33 = 0;
         _fx_R17C_form__cdeffun_t v_34 = {0};
         _fx_rR17C_form__cdeffun_t mktup_decl_0 = 0;
         _fx_N15C_form__cinfo_t v_35 = {0};
         _fx_N15C_form__cstmt_t v_36 = 0;
         _fx_LN15C_form__cstmt_t v_37 = 0;
         _fx_R17C_form__cdeffun_t v_38 = {0};
         _fx_LN15C_form__cstmt_t v_39 = 0;
         _fx_R17C_form__cdeffun_t v_40 = {0};
         _fx_LT2R9Ast__id_tN14C_form__ctyp_t v_41 = 0;
         _fx_N14C_form__ctyp_t v_42 = 0;
         _fx_R17C_form__ctprops_t v_43 = {0};
         _fx_R17C_form__cdeftyp_t v_44 = {0};
         _fx_make_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
            0, 0, 0, 0, 0, &__fold_result___0);
         int_ i_0 = 0;
         FX_COPY_PTR(kt_typ_0->u.KTypTuple, &telems_0);
         _fx_LN14K_form__ktyp_t lst_0 = telems_0;
         for (; lst_0; lst_0 = lst_0->tl, i_0 += 1) {
            _fx_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t
               v_45 = {0};
            _fx_LN15C_form__cstmt_t free_code_1 = 0;
            _fx_LN15C_form__cstmt_t copy_code_1 = 0;
            _fx_LN15C_form__cstmt_t make_code_1 = 0;
            _fx_LT2R9Ast__id_tN14C_form__ctyp_t relems_1 = 0;
            _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t make_args_2 = 0;
            fx_str_t v_46 = {0};
            fx_str_t v_47 = {0};
            _fx_N14C_form__ctyp_t cti_0 = 0;
            _fx_T2N14C_form__ctyp_tR10Ast__loc_t v_48 = {0};
            _fx_N14C_form__cexp_t selem_0 = 0;
            _fx_T2N14C_form__ctyp_tR10Ast__loc_t v_49 = {0};
            _fx_N14C_form__cexp_t delem_0 = 0;
            _fx_LN15C_form__cstmt_t free_code_2 = 0;
            _fx_LN15C_form__cstmt_t copy_code_2 = 0;
            _fx_N14C_form__cexp_t selem2_0 = 0;
            _fx_T3N14C_form__ctyp_tLN19C_form__carg_attr_tN14C_form__cexp_t v_50 = {0};
            _fx_N14C_form__ctyp_t v_51 = 0;
            _fx_LN19C_form__carg_attr_t v_52 = 0;
            _fx_N14C_form__cexp_t v_53 = 0;
            _fx_N14C_form__ctyp_t cti_arg_0 = 0;
            _fx_LN19C_form__carg_attr_t cti_arg_flags_0 = 0;
            _fx_N14C_form__cexp_t selem2_1 = 0;
            _fx_T2N14C_form__ctyp_tR10Ast__loc_t v_54 = {0};
            _fx_N14C_form__cexp_t delem2_0 = 0;
            _fx_LN15C_form__cstmt_t make_code_2 = 0;
            _fx_T2R9Ast__id_tN14C_form__ctyp_t v_55 = {0};
            _fx_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t v_56 = {0};
            _fx_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t
               v_57 = {0};
            _fx_N14K_form__ktyp_t kti_0 = lst_0->hd;
            _fx_copy_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
               &__fold_result___0, &v_45);
            FX_COPY_PTR(v_45.t0, &free_code_1);
            FX_COPY_PTR(v_45.t1, &copy_code_1);
            FX_COPY_PTR(v_45.t2, &make_code_1);
            FX_COPY_PTR(v_45.t3, &relems_1);
            FX_COPY_PTR(v_45.t4, &make_args_2);
            FX_CALL(_fx_F6stringS1i(i_0, &v_46, 0), _fx_catch_8);
            fx_str_t slit_5 = FX_MAKE_STR("t");
            {
               const fx_str_t strs_2[] = { slit_5, v_46 };
               FX_CALL(fx_strjoin(0, 0, 0, strs_2, 2, &v_47), _fx_catch_8);
            }
            _fx_R9Ast__id_t ni_0;
            FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&v_47, &ni_0, 0), _fx_catch_8);
            FX_CALL(_fx_M11C_gen_typesFM9ktyp2ctypN14C_form__ctyp_t2N14K_form__ktyp_tR10Ast__loc_t(kti_0, &kt_loc_0, &cti_0, 0),
               _fx_catch_8);
            _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(cti_0, loc_0, &v_48);
            FX_CALL(
               _fx_M6C_formFM9CExpArrowN14C_form__cexp_t3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(src_exp_0,
                  &ni_0, &v_48, &selem_0), _fx_catch_8);
            _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(cti_0, loc_0, &v_49);
            FX_CALL(
               _fx_M6C_formFM9CExpArrowN14C_form__cexp_t3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(dst_exp_0,
                  &ni_0, &v_49, &delem_0), _fx_catch_8);
            FX_CALL(
               _fx_M11C_gen_typesFM13gen_free_codeLN15C_form__cstmt_t6N14C_form__cexp_tN14C_form__ctyp_tBBLN15C_form__cstmt_tR10Ast__loc_t(
                  delem_0, cti_0, false, false, free_code_1, &kt_loc_0, &free_code_2, 0), _fx_catch_8);
            FX_CALL(
               _fx_M11C_gen_typesFM13gen_copy_codeLN15C_form__cstmt_t5N14C_form__cexp_tN14C_form__cexp_tN14C_form__ctyp_tLN15C_form__cstmt_tR10Ast__loc_t(
                  selem_0, delem_0, cti_0, copy_code_1, &kt_loc_0, &copy_code_2, 0), _fx_catch_8);
            _fx_R17K_form__ktprops_t v_58;
            FX_CALL(
               _fx_M10K_annotateFM11get_ktpropsR17K_form__ktprops_t2N14K_form__ktyp_tR10Ast__loc_t(kti_0, &kt_loc_0, &v_58, 0),
               _fx_catch_8);
            bool ktp_pass_by_ref_0 = v_58.ktp_pass_by_ref;
            FX_CALL(_fx_M6C_formFM11make_id_expN14C_form__cexp_t2R9Ast__id_tR10Ast__loc_t(&ni_0, loc_0, &selem2_0, 0),
               _fx_catch_8);
            if (ktp_pass_by_ref_0) {
               FX_CALL(_fx_M6C_formFM14make_const_ptrN14C_form__ctyp_t1N14C_form__ctyp_t(cti_0, &v_51, 0), _fx_catch_8);
               FX_CALL(_fx_cons_LN19C_form__carg_attr_t(&_fx_g26C_gen_types__CArgPassByPtr, 0, true, &v_52), _fx_catch_8);
               FX_CALL(_fx_M6C_formFM10cexp_derefN14C_form__cexp_t1N14C_form__cexp_t(selem2_0, &v_53, 0), _fx_catch_8);
               _fx_make_T3N14C_form__ctyp_tLN19C_form__carg_attr_tN14C_form__cexp_t(v_51, v_52, v_53, &v_50);
            }
            else {
               _fx_make_T3N14C_form__ctyp_tLN19C_form__carg_attr_tN14C_form__cexp_t(cti_0, 0, selem2_0, &v_50);
            }
            FX_COPY_PTR(v_50.t0, &cti_arg_0);
            FX_COPY_PTR(v_50.t1, &cti_arg_flags_0);
            FX_COPY_PTR(v_50.t2, &selem2_1);
            _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(cti_0, loc_0, &v_54);
            FX_CALL(
               _fx_M6C_formFM9CExpArrowN14C_form__cexp_t3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(
                  fx_result_exp_0, &ni_0, &v_54, &delem2_0), _fx_catch_8);
            FX_CALL(
               _fx_M11C_gen_typesFM13gen_copy_codeLN15C_form__cstmt_t5N14C_form__cexp_tN14C_form__cexp_tN14C_form__ctyp_tLN15C_form__cstmt_tR10Ast__loc_t(
                  selem2_1, delem2_0, cti_0, make_code_1, &kt_loc_0, &make_code_2, 0), _fx_catch_8);
            _fx_make_T2R9Ast__id_tN14C_form__ctyp_t(&ni_0, cti_0, &v_55);
            FX_CALL(_fx_cons_LT2R9Ast__id_tN14C_form__ctyp_t(&v_55, relems_1, false, &relems_1), _fx_catch_8);
            _fx_make_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&ni_0, cti_arg_0, cti_arg_flags_0, &v_56);
            FX_CALL(_fx_cons_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_56, make_args_2, false, &make_args_2),
               _fx_catch_8);
            _fx_make_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
               free_code_2, copy_code_2, make_code_2, relems_1, make_args_2, &v_57);
            _fx_free_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
               &__fold_result___0);
            _fx_copy_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
               &v_57, &__fold_result___0);

         _fx_catch_8: ;
            _fx_free_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
               &v_57);
            _fx_free_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_56);
            _fx_free_T2R9Ast__id_tN14C_form__ctyp_t(&v_55);
            if (make_code_2) {
               _fx_free_LN15C_form__cstmt_t(&make_code_2);
            }
            if (delem2_0) {
               _fx_free_N14C_form__cexp_t(&delem2_0);
            }
            _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&v_54);
            if (selem2_1) {
               _fx_free_N14C_form__cexp_t(&selem2_1);
            }
            FX_FREE_LIST_SIMPLE(&cti_arg_flags_0);
            if (cti_arg_0) {
               _fx_free_N14C_form__ctyp_t(&cti_arg_0);
            }
            if (v_53) {
               _fx_free_N14C_form__cexp_t(&v_53);
            }
            FX_FREE_LIST_SIMPLE(&v_52);
            if (v_51) {
               _fx_free_N14C_form__ctyp_t(&v_51);
            }
            _fx_free_T3N14C_form__ctyp_tLN19C_form__carg_attr_tN14C_form__cexp_t(&v_50);
            if (selem2_0) {
               _fx_free_N14C_form__cexp_t(&selem2_0);
            }
            if (copy_code_2) {
               _fx_free_LN15C_form__cstmt_t(&copy_code_2);
            }
            if (free_code_2) {
               _fx_free_LN15C_form__cstmt_t(&free_code_2);
            }
            if (delem_0) {
               _fx_free_N14C_form__cexp_t(&delem_0);
            }
            _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&v_49);
            if (selem_0) {
               _fx_free_N14C_form__cexp_t(&selem_0);
            }
            _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&v_48);
            if (cti_0) {
               _fx_free_N14C_form__ctyp_t(&cti_0);
            }
            FX_FREE_STR(&v_47);
            FX_FREE_STR(&v_46);
            if (make_args_2) {
               _fx_free_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&make_args_2);
            }
            if (relems_1) {
               _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&relems_1);
            }
            if (make_code_1) {
               _fx_free_LN15C_form__cstmt_t(&make_code_1);
            }
            if (copy_code_1) {
               _fx_free_LN15C_form__cstmt_t(&copy_code_1);
            }
            if (free_code_1) {
               _fx_free_LN15C_form__cstmt_t(&free_code_1);
            }
            _fx_free_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
               &v_45);
            FX_CHECK_EXN(_fx_catch_9);
         }
         _fx_copy_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
            &__fold_result___0, &v_27);
         FX_COPY_PTR(v_27.t0, &free_code_0);
         FX_COPY_PTR(v_27.t1, &copy_code_0);
         FX_COPY_PTR(v_27.t2, &make_code_0);
         FX_COPY_PTR(v_27.t3, &relems_0);
         FX_COPY_PTR(v_27.t4, &make_args_0);
         if (ktp_0.ktp_complex) {
            FX_CALL(_fx_M6C_formFM8make_ptrN14C_form__ctyp_t1N14C_form__ctyp_t(fx_result_ct_0, &v_28, 0), _fx_catch_9);
            FX_CALL(_fx_cons_LN19C_form__carg_attr_t(&_fx_g23C_gen_types__CArgRetVal, 0, true, &v_29), _fx_catch_9);
            FX_CALL(_fx_cons_LN19C_form__carg_attr_t(&_fx_g26C_gen_types__CArgPassByPtr, v_29, false, &v_29), _fx_catch_9);
            _fx_make_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&fx_result_id_0, v_28, v_29, &v_30);
            FX_CALL(_fx_cons_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_30, make_args_0, true, &make_args_1),
               _fx_catch_9);
            _fx_R9Ast__id_t mktup_id_0;
            fx_str_t slit_6 = FX_MAKE_STR("mktup");
            FX_CALL(_fx_M6C_formFM7gen_idcR9Ast__id_t2iS(*curr_cm_idx_0, &slit_6, &mktup_id_0, 0), _fx_catch_9);
            fx_str_t slit_7 = FX_MAKE_STR("_fx_make_");
            {
               const fx_str_t strs_3[] = { slit_7, tp_cname_wo_prefix_0 };
               FX_CALL(fx_strjoin(0, 0, 0, strs_3, 2, &v_31), _fx_catch_9);
            }
            FX_CALL(
               _fx_M11C_gen_typesFM3revLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t1LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
                  make_args_1, &v_32, 0), _fx_catch_9);
            FX_CALL(_fx_M11C_gen_typesFM3revLN15C_form__cstmt_t1LN15C_form__cstmt_t(make_code_0, &v_33, 0), _fx_catch_9);
            _fx_R16Ast__fun_flags_t v_59;
            FX_CALL(_fx_M3AstFM17default_fun_flagsRM11fun_flags_t0(&v_59, 0), _fx_catch_9);
            _fx_R16Ast__fun_flags_t v_60 =
               { v_59.fun_flag_pure, v_59.fun_flag_ccode, v_59.fun_flag_have_keywords, v_59.fun_flag_inline, true,
                  v_59.fun_flag_really_nothrow, true, v_59.fun_flag_ctor, v_59.fun_flag_method_of, v_59.fun_flag_uses_fv,
                  v_59.fun_flag_recursive, v_59.fun_flag_instance };
            _fx_make_R17C_form__cdeffun_t(&mktup_id_0, &v_31, v_32, _fx_g21C_gen_types__CTypVoid, v_33, &v_60, 0, loc_0, &v_34);
            FX_CALL(_fx_make_rR17C_form__cdeffun_t(&v_34, &mktup_decl_0), _fx_catch_9);
            _fx_M6C_formFM4CFunN15C_form__cinfo_t1rRM9cdeffun_t(mktup_decl_0, &v_35);
            FX_CALL(_fx_M6C_formFM13set_idc_entryv2R9Ast__id_tN15C_form__cinfo_t(&mktup_id_0, &v_35, 0), _fx_catch_9);
            FX_CALL(_fx_M6C_formFM7CDefFunN15C_form__cstmt_t1rRM9cdeffun_t(mktup_decl_0, &v_36), _fx_catch_9);
            FX_CALL(
               _fx_M11C_gen_typesFM8add_declv5R9Ast__id_tN15C_form__cstmt_trRt6Set__t1R9Ast__id_trLN15C_form__cstmt_trLN15C_form__cstmt_t(
                  &mktup_id_0, v_36, all_decls_ref_0, top_typ_decl_ref_0, top_typfun_decl_ref_0, 0), _fx_catch_9);
            _fx_R17C_form__cdeffun_t* v_61 = &freef_decl_0->data;
            FX_CALL(_fx_M11C_gen_typesFM3revLN15C_form__cstmt_t1LN15C_form__cstmt_t(free_code_0, &v_37, 0), _fx_catch_9);
            _fx_make_R17C_form__cdeffun_t(&v_61->cf_name, &v_61->cf_cname, v_61->cf_args, v_61->cf_rt, v_37, &v_61->cf_flags,
               v_61->cf_scope, &v_61->cf_loc, &v_38);
            _fx_R17C_form__cdeffun_t* v_62 = &freef_decl_0->data;
            _fx_free_R17C_form__cdeffun_t(v_62);
            _fx_copy_R17C_form__cdeffun_t(&v_38, v_62);
            _fx_R17C_form__cdeffun_t* v_63 = &copyf_decl_0->data;
            FX_CALL(_fx_M11C_gen_typesFM3revLN15C_form__cstmt_t1LN15C_form__cstmt_t(copy_code_0, &v_39, 0), _fx_catch_9);
            _fx_make_R17C_form__cdeffun_t(&v_63->cf_name, &v_63->cf_cname, v_63->cf_args, v_63->cf_rt, v_39, &v_63->cf_flags,
               v_63->cf_scope, &v_63->cf_loc, &v_40);
            _fx_R17C_form__cdeffun_t* v_64 = &copyf_decl_0->data;
            _fx_free_R17C_form__cdeffun_t(v_64);
            _fx_copy_R17C_form__cdeffun_t(&v_40, v_64);
            FX_CALL(_fx_cons_LR9Ast__id_t(&mktup_id_0, 0, true, &mktupl_0), _fx_catch_9);
         }
         _fx_R17C_form__cdeftyp_t* v_65 = &struct_decl_0->data;
         _fx_Nt6option1R9Ast__id_t v_66;
         _fx_M11C_gen_typesFM4SomeNt6option1R9Ast__id_t1R9Ast__id_t(tn_0, &v_66);
         FX_CALL(_fx_M11C_gen_typesFM3revLT2R9Ast__id_tN14C_form__ctyp_t1LT2R9Ast__id_tN14C_form__ctyp_t(relems_0, &v_41, 0),
            _fx_catch_9);
         FX_CALL(
            _fx_M6C_formFM10CTypStructN14C_form__ctyp_t2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t(&v_66, v_41,
               &v_42), _fx_catch_9);
         _fx_make_R17C_form__ctprops_t(ct_props_0.ctp_scalar, ct_props_0.ctp_complex, ct_props_0.ctp_ptr,
            ct_props_0.ctp_pass_by_ref, mktupl_0, &ct_props_0.ctp_free, &ct_props_0.ctp_copy, &v_43);
         _fx_make_R17C_form__cdeftyp_t(&v_65->ct_name, v_42, &v_65->ct_cname, &v_43, v_65->ct_data_start, &v_65->ct_enum,
            v_65->ct_ifaces, &v_65->ct_ifaces_id, v_65->ct_scope, &v_65->ct_loc, &v_44);
         _fx_R17C_form__cdeftyp_t* v_67 = &struct_decl_0->data;
         _fx_free_R17C_form__cdeftyp_t(v_67);
         _fx_copy_R17C_form__cdeftyp_t(&v_44, v_67);

      _fx_catch_9: ;
         _fx_free_R17C_form__cdeftyp_t(&v_44);
         _fx_free_R17C_form__ctprops_t(&v_43);
         if (v_42) {
            _fx_free_N14C_form__ctyp_t(&v_42);
         }
         if (v_41) {
            _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&v_41);
         }
         _fx_free_R17C_form__cdeffun_t(&v_40);
         if (v_39) {
            _fx_free_LN15C_form__cstmt_t(&v_39);
         }
         _fx_free_R17C_form__cdeffun_t(&v_38);
         if (v_37) {
            _fx_free_LN15C_form__cstmt_t(&v_37);
         }
         if (v_36) {
            _fx_free_N15C_form__cstmt_t(&v_36);
         }
         _fx_free_N15C_form__cinfo_t(&v_35);
         if (mktup_decl_0) {
            _fx_free_rR17C_form__cdeffun_t(&mktup_decl_0);
         }
         _fx_free_R17C_form__cdeffun_t(&v_34);
         if (v_33) {
            _fx_free_LN15C_form__cstmt_t(&v_33);
         }
         if (v_32) {
            _fx_free_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_32);
         }
         FX_FREE_STR(&v_31);
         if (make_args_1) {
            _fx_free_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&make_args_1);
         }
         _fx_free_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_30);
         FX_FREE_LIST_SIMPLE(&v_29);
         if (v_28) {
            _fx_free_N14C_form__ctyp_t(&v_28);
         }
         FX_FREE_LIST_SIMPLE(&mktupl_0);
         if (make_args_0) {
            _fx_free_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&make_args_0);
         }
         if (relems_0) {
            _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&relems_0);
         }
         if (make_code_0) {
            _fx_free_LN15C_form__cstmt_t(&make_code_0);
         }
         if (copy_code_0) {
            _fx_free_LN15C_form__cstmt_t(&copy_code_0);
         }
         if (free_code_0) {
            _fx_free_LN15C_form__cstmt_t(&free_code_0);
         }
         _fx_free_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
            &v_27);
         if (telems_0) {
            _fx_free_LN14K_form__ktyp_t(&telems_0);
         }
         _fx_free_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
            &__fold_result___0);
      }
      else if (tag_1 == 15) {
         _fx_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t
            __fold_result___1 = {0};
         _fx_LT2R9Ast__id_tN14K_form__ktyp_t relems_2 = 0;
         _fx_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t
            v_68 = {0};
         _fx_LN15C_form__cstmt_t free_code_3 = 0;
         _fx_LN15C_form__cstmt_t copy_code_3 = 0;
         _fx_LN15C_form__cstmt_t make_code_3 = 0;
         _fx_LT2R9Ast__id_tN14C_form__ctyp_t relems_3 = 0;
         _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t make_args_3 = 0;
         _fx_LR9Ast__id_t mkrecl_0 = 0;
         _fx_N14C_form__ctyp_t v_69 = 0;
         _fx_LN19C_form__carg_attr_t v_70 = 0;
         _fx_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t v_71 = {0};
         _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t make_args_4 = 0;
         fx_str_t v_72 = {0};
         _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t v_73 = 0;
         _fx_LN15C_form__cstmt_t v_74 = 0;
         _fx_R17C_form__cdeffun_t v_75 = {0};
         _fx_rR17C_form__cdeffun_t mkrec_decl_0 = 0;
         _fx_N15C_form__cinfo_t v_76 = {0};
         _fx_N15C_form__cstmt_t v_77 = 0;
         _fx_LN15C_form__cstmt_t v_78 = 0;
         _fx_R17C_form__cdeffun_t v_79 = {0};
         _fx_LN15C_form__cstmt_t v_80 = 0;
         _fx_R17C_form__cdeffun_t v_81 = {0};
         _fx_LT2R9Ast__id_tN14C_form__ctyp_t v_82 = 0;
         _fx_N14C_form__ctyp_t v_83 = 0;
         _fx_R17C_form__ctprops_t v_84 = {0};
         _fx_R17C_form__cdeftyp_t v_85 = {0};
         _fx_make_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
            0, 0, 0, 0, 0, &__fold_result___1);
         FX_COPY_PTR(kt_typ_0->u.KTypRecord.t1, &relems_2);
         _fx_LT2R9Ast__id_tN14K_form__ktyp_t lst_1 = relems_2;
         for (; lst_1; lst_1 = lst_1->tl) {
            _fx_N14K_form__ktyp_t kti_1 = 0;
            _fx_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t
               v_86 = {0};
            _fx_LN15C_form__cstmt_t free_code_4 = 0;
            _fx_LN15C_form__cstmt_t copy_code_4 = 0;
            _fx_LN15C_form__cstmt_t make_code_4 = 0;
            _fx_LT2R9Ast__id_tN14C_form__ctyp_t relems_4 = 0;
            _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t make_args_5 = 0;
            _fx_N14C_form__ctyp_t cti_1 = 0;
            _fx_T2N14C_form__ctyp_tR10Ast__loc_t v_87 = {0};
            _fx_N14C_form__cexp_t selem_1 = 0;
            _fx_T2N14C_form__ctyp_tR10Ast__loc_t v_88 = {0};
            _fx_N14C_form__cexp_t delem_1 = 0;
            _fx_LN15C_form__cstmt_t free_code_5 = 0;
            _fx_LN15C_form__cstmt_t copy_code_5 = 0;
            fx_str_t v_89 = {0};
            fx_str_t v_90 = {0};
            _fx_N14C_form__cexp_t selem2_2 = 0;
            _fx_T3N14C_form__ctyp_tLN19C_form__carg_attr_tN14C_form__cexp_t v_91 = {0};
            _fx_N14C_form__ctyp_t v_92 = 0;
            _fx_LN19C_form__carg_attr_t v_93 = 0;
            _fx_N14C_form__cexp_t v_94 = 0;
            _fx_N14C_form__ctyp_t cti_arg_1 = 0;
            _fx_LN19C_form__carg_attr_t cti_arg_flags_1 = 0;
            _fx_N14C_form__cexp_t selem2_3 = 0;
            _fx_T2N14C_form__ctyp_tR10Ast__loc_t v_95 = {0};
            _fx_N14C_form__cexp_t delem2_1 = 0;
            _fx_LN15C_form__cstmt_t make_code_5 = 0;
            _fx_T2R9Ast__id_tN14C_form__ctyp_t v_96 = {0};
            _fx_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t v_97 = {0};
            _fx_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t
               v_98 = {0};
            _fx_T2R9Ast__id_tN14K_form__ktyp_t* __pat___0 = &lst_1->hd;
            _fx_R9Ast__id_t ni_1 = __pat___0->t0;
            FX_COPY_PTR(__pat___0->t1, &kti_1);
            _fx_copy_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
               &__fold_result___1, &v_86);
            FX_COPY_PTR(v_86.t0, &free_code_4);
            FX_COPY_PTR(v_86.t1, &copy_code_4);
            FX_COPY_PTR(v_86.t2, &make_code_4);
            FX_COPY_PTR(v_86.t3, &relems_4);
            FX_COPY_PTR(v_86.t4, &make_args_5);
            FX_CALL(_fx_M11C_gen_typesFM9ktyp2ctypN14C_form__ctyp_t2N14K_form__ktyp_tR10Ast__loc_t(kti_1, loc_0, &cti_1, 0),
               _fx_catch_10);
            _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(cti_1, &kt_loc_0, &v_87);
            FX_CALL(
               _fx_M6C_formFM9CExpArrowN14C_form__cexp_t3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(src_exp_0,
                  &ni_1, &v_87, &selem_1), _fx_catch_10);
            _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(cti_1, &kt_loc_0, &v_88);
            FX_CALL(
               _fx_M6C_formFM9CExpArrowN14C_form__cexp_t3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(dst_exp_0,
                  &ni_1, &v_88, &delem_1), _fx_catch_10);
            FX_CALL(
               _fx_M11C_gen_typesFM13gen_free_codeLN15C_form__cstmt_t6N14C_form__cexp_tN14C_form__ctyp_tBBLN15C_form__cstmt_tR10Ast__loc_t(
                  delem_1, cti_1, false, false, free_code_4, &kt_loc_0, &free_code_5, 0), _fx_catch_10);
            FX_CALL(
               _fx_M11C_gen_typesFM13gen_copy_codeLN15C_form__cstmt_t5N14C_form__cexp_tN14C_form__cexp_tN14C_form__ctyp_tLN15C_form__cstmt_tR10Ast__loc_t(
                  selem_1, delem_1, cti_1, copy_code_4, &kt_loc_0, &copy_code_5, 0), _fx_catch_10);
            _fx_R17K_form__ktprops_t v_99;
            FX_CALL(
               _fx_M10K_annotateFM11get_ktpropsR17K_form__ktprops_t2N14K_form__ktyp_tR10Ast__loc_t(kti_1, &kt_loc_0, &v_99, 0),
               _fx_catch_10);
            bool ktp_pass_by_ref_1 = v_99.ktp_pass_by_ref;
            FX_CALL(_fx_M3AstFM2ppS1RM4id_t(&ni_1, &v_89, 0), _fx_catch_10);
            fx_str_t slit_8 = FX_MAKE_STR("r_");
            {
               const fx_str_t strs_4[] = { slit_8, v_89 };
               FX_CALL(fx_strjoin(0, 0, 0, strs_4, 2, &v_90), _fx_catch_10);
            }
            _fx_R9Ast__id_t arg_ni_0;
            FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&v_90, &arg_ni_0, 0), _fx_catch_10);
            FX_CALL(_fx_M6C_formFM11make_id_expN14C_form__cexp_t2R9Ast__id_tR10Ast__loc_t(&arg_ni_0, loc_0, &selem2_2, 0),
               _fx_catch_10);
            if (ktp_pass_by_ref_1) {
               FX_CALL(_fx_M6C_formFM14make_const_ptrN14C_form__ctyp_t1N14C_form__ctyp_t(cti_1, &v_92, 0), _fx_catch_10);
               FX_CALL(_fx_cons_LN19C_form__carg_attr_t(&_fx_g26C_gen_types__CArgPassByPtr, 0, true, &v_93), _fx_catch_10);
               FX_CALL(_fx_M6C_formFM10cexp_derefN14C_form__cexp_t1N14C_form__cexp_t(selem2_2, &v_94, 0), _fx_catch_10);
               _fx_make_T3N14C_form__ctyp_tLN19C_form__carg_attr_tN14C_form__cexp_t(v_92, v_93, v_94, &v_91);
            }
            else {
               _fx_make_T3N14C_form__ctyp_tLN19C_form__carg_attr_tN14C_form__cexp_t(cti_1, 0, selem2_2, &v_91);
            }
            FX_COPY_PTR(v_91.t0, &cti_arg_1);
            FX_COPY_PTR(v_91.t1, &cti_arg_flags_1);
            FX_COPY_PTR(v_91.t2, &selem2_3);
            _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(cti_1, loc_0, &v_95);
            FX_CALL(
               _fx_M6C_formFM9CExpArrowN14C_form__cexp_t3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(
                  fx_result_exp_0, &ni_1, &v_95, &delem2_1), _fx_catch_10);
            FX_CALL(
               _fx_M11C_gen_typesFM13gen_copy_codeLN15C_form__cstmt_t5N14C_form__cexp_tN14C_form__cexp_tN14C_form__ctyp_tLN15C_form__cstmt_tR10Ast__loc_t(
                  selem2_3, delem2_1, cti_1, make_code_4, &kt_loc_0, &make_code_5, 0), _fx_catch_10);
            _fx_make_T2R9Ast__id_tN14C_form__ctyp_t(&ni_1, cti_1, &v_96);
            FX_CALL(_fx_cons_LT2R9Ast__id_tN14C_form__ctyp_t(&v_96, relems_4, false, &relems_4), _fx_catch_10);
            _fx_make_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&arg_ni_0, cti_arg_1, cti_arg_flags_1, &v_97);
            FX_CALL(_fx_cons_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_97, make_args_5, false, &make_args_5),
               _fx_catch_10);
            _fx_make_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
               free_code_5, copy_code_5, make_code_5, relems_4, make_args_5, &v_98);
            _fx_free_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
               &__fold_result___1);
            _fx_copy_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
               &v_98, &__fold_result___1);

         _fx_catch_10: ;
            _fx_free_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
               &v_98);
            _fx_free_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_97);
            _fx_free_T2R9Ast__id_tN14C_form__ctyp_t(&v_96);
            if (make_code_5) {
               _fx_free_LN15C_form__cstmt_t(&make_code_5);
            }
            if (delem2_1) {
               _fx_free_N14C_form__cexp_t(&delem2_1);
            }
            _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&v_95);
            if (selem2_3) {
               _fx_free_N14C_form__cexp_t(&selem2_3);
            }
            FX_FREE_LIST_SIMPLE(&cti_arg_flags_1);
            if (cti_arg_1) {
               _fx_free_N14C_form__ctyp_t(&cti_arg_1);
            }
            if (v_94) {
               _fx_free_N14C_form__cexp_t(&v_94);
            }
            FX_FREE_LIST_SIMPLE(&v_93);
            if (v_92) {
               _fx_free_N14C_form__ctyp_t(&v_92);
            }
            _fx_free_T3N14C_form__ctyp_tLN19C_form__carg_attr_tN14C_form__cexp_t(&v_91);
            if (selem2_2) {
               _fx_free_N14C_form__cexp_t(&selem2_2);
            }
            FX_FREE_STR(&v_90);
            FX_FREE_STR(&v_89);
            if (copy_code_5) {
               _fx_free_LN15C_form__cstmt_t(&copy_code_5);
            }
            if (free_code_5) {
               _fx_free_LN15C_form__cstmt_t(&free_code_5);
            }
            if (delem_1) {
               _fx_free_N14C_form__cexp_t(&delem_1);
            }
            _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&v_88);
            if (selem_1) {
               _fx_free_N14C_form__cexp_t(&selem_1);
            }
            _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&v_87);
            if (cti_1) {
               _fx_free_N14C_form__ctyp_t(&cti_1);
            }
            if (make_args_5) {
               _fx_free_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&make_args_5);
            }
            if (relems_4) {
               _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&relems_4);
            }
            if (make_code_4) {
               _fx_free_LN15C_form__cstmt_t(&make_code_4);
            }
            if (copy_code_4) {
               _fx_free_LN15C_form__cstmt_t(&copy_code_4);
            }
            if (free_code_4) {
               _fx_free_LN15C_form__cstmt_t(&free_code_4);
            }
            _fx_free_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
               &v_86);
            if (kti_1) {
               _fx_free_N14K_form__ktyp_t(&kti_1);
            }
            FX_CHECK_EXN(_fx_catch_11);
         }
         _fx_copy_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
            &__fold_result___1, &v_68);
         FX_COPY_PTR(v_68.t0, &free_code_3);
         FX_COPY_PTR(v_68.t1, &copy_code_3);
         FX_COPY_PTR(v_68.t2, &make_code_3);
         FX_COPY_PTR(v_68.t3, &relems_3);
         FX_COPY_PTR(v_68.t4, &make_args_3);
         if (ktp_0.ktp_complex) {
            FX_CALL(_fx_M6C_formFM8make_ptrN14C_form__ctyp_t1N14C_form__ctyp_t(fx_result_ct_0, &v_69, 0), _fx_catch_11);
            FX_CALL(_fx_cons_LN19C_form__carg_attr_t(&_fx_g23C_gen_types__CArgRetVal, 0, true, &v_70), _fx_catch_11);
            FX_CALL(_fx_cons_LN19C_form__carg_attr_t(&_fx_g26C_gen_types__CArgPassByPtr, v_70, false, &v_70), _fx_catch_11);
            _fx_make_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&fx_result_id_0, v_69, v_70, &v_71);
            FX_CALL(_fx_cons_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_71, make_args_3, true, &make_args_4),
               _fx_catch_11);
            _fx_R9Ast__id_t mkrec_id_0;
            fx_str_t slit_9 = FX_MAKE_STR("mktup");
            FX_CALL(_fx_M6C_formFM7gen_idcR9Ast__id_t2iS(*curr_cm_idx_0, &slit_9, &mkrec_id_0, 0), _fx_catch_11);
            fx_str_t slit_10 = FX_MAKE_STR("_fx_make_");
            {
               const fx_str_t strs_5[] = { slit_10, tp_cname_wo_prefix_0 };
               FX_CALL(fx_strjoin(0, 0, 0, strs_5, 2, &v_72), _fx_catch_11);
            }
            FX_CALL(
               _fx_M11C_gen_typesFM3revLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t1LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
                  make_args_4, &v_73, 0), _fx_catch_11);
            FX_CALL(_fx_M11C_gen_typesFM3revLN15C_form__cstmt_t1LN15C_form__cstmt_t(make_code_3, &v_74, 0), _fx_catch_11);
            _fx_R16Ast__fun_flags_t v_100;
            FX_CALL(_fx_M3AstFM17default_fun_flagsRM11fun_flags_t0(&v_100, 0), _fx_catch_11);
            _fx_R16Ast__fun_flags_t v_101 =
               { v_100.fun_flag_pure, v_100.fun_flag_ccode, v_100.fun_flag_have_keywords, v_100.fun_flag_inline, true,
                  v_100.fun_flag_really_nothrow, true, v_100.fun_flag_ctor, v_100.fun_flag_method_of, v_100.fun_flag_uses_fv,
                  v_100.fun_flag_recursive, v_100.fun_flag_instance };
            _fx_make_R17C_form__cdeffun_t(&mkrec_id_0, &v_72, v_73, _fx_g21C_gen_types__CTypVoid, v_74, &v_101, 0, loc_0,
               &v_75);
            FX_CALL(_fx_make_rR17C_form__cdeffun_t(&v_75, &mkrec_decl_0), _fx_catch_11);
            _fx_M6C_formFM4CFunN15C_form__cinfo_t1rRM9cdeffun_t(mkrec_decl_0, &v_76);
            FX_CALL(_fx_M6C_formFM13set_idc_entryv2R9Ast__id_tN15C_form__cinfo_t(&mkrec_id_0, &v_76, 0), _fx_catch_11);
            FX_CALL(_fx_M6C_formFM7CDefFunN15C_form__cstmt_t1rRM9cdeffun_t(mkrec_decl_0, &v_77), _fx_catch_11);
            FX_CALL(
               _fx_M11C_gen_typesFM8add_declv5R9Ast__id_tN15C_form__cstmt_trRt6Set__t1R9Ast__id_trLN15C_form__cstmt_trLN15C_form__cstmt_t(
                  &mkrec_id_0, v_77, all_decls_ref_0, top_typ_decl_ref_0, top_typfun_decl_ref_0, 0), _fx_catch_11);
            _fx_R17C_form__cdeffun_t* v_102 = &freef_decl_0->data;
            FX_CALL(_fx_M11C_gen_typesFM3revLN15C_form__cstmt_t1LN15C_form__cstmt_t(free_code_3, &v_78, 0), _fx_catch_11);
            _fx_make_R17C_form__cdeffun_t(&v_102->cf_name, &v_102->cf_cname, v_102->cf_args, v_102->cf_rt, v_78,
               &v_102->cf_flags, v_102->cf_scope, &v_102->cf_loc, &v_79);
            _fx_R17C_form__cdeffun_t* v_103 = &freef_decl_0->data;
            _fx_free_R17C_form__cdeffun_t(v_103);
            _fx_copy_R17C_form__cdeffun_t(&v_79, v_103);
            _fx_R17C_form__cdeffun_t* v_104 = &copyf_decl_0->data;
            FX_CALL(_fx_M11C_gen_typesFM3revLN15C_form__cstmt_t1LN15C_form__cstmt_t(copy_code_3, &v_80, 0), _fx_catch_11);
            _fx_make_R17C_form__cdeffun_t(&v_104->cf_name, &v_104->cf_cname, v_104->cf_args, v_104->cf_rt, v_80,
               &v_104->cf_flags, v_104->cf_scope, &v_104->cf_loc, &v_81);
            _fx_R17C_form__cdeffun_t* v_105 = &copyf_decl_0->data;
            _fx_free_R17C_form__cdeffun_t(v_105);
            _fx_copy_R17C_form__cdeffun_t(&v_81, v_105);
            FX_CALL(_fx_cons_LR9Ast__id_t(&mkrec_id_0, 0, true, &mkrecl_0), _fx_catch_11);
         }
         _fx_R17C_form__cdeftyp_t* v_106 = &struct_decl_0->data;
         _fx_Nt6option1R9Ast__id_t v_107;
         _fx_M11C_gen_typesFM4SomeNt6option1R9Ast__id_t1R9Ast__id_t(tn_0, &v_107);
         FX_CALL(_fx_M11C_gen_typesFM3revLT2R9Ast__id_tN14C_form__ctyp_t1LT2R9Ast__id_tN14C_form__ctyp_t(relems_3, &v_82, 0),
            _fx_catch_11);
         FX_CALL(
            _fx_M6C_formFM10CTypStructN14C_form__ctyp_t2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t(&v_107, v_82,
               &v_83), _fx_catch_11);
         _fx_make_R17C_form__ctprops_t(ct_props_0.ctp_scalar, ct_props_0.ctp_complex, ct_props_0.ctp_ptr,
            ct_props_0.ctp_pass_by_ref, mkrecl_0, &ct_props_0.ctp_free, &ct_props_0.ctp_copy, &v_84);
         _fx_make_R17C_form__cdeftyp_t(&v_106->ct_name, v_83, &v_106->ct_cname, &v_84, v_106->ct_data_start, &v_106->ct_enum,
            v_106->ct_ifaces, &v_106->ct_ifaces_id, v_106->ct_scope, &v_106->ct_loc, &v_85);
         _fx_R17C_form__cdeftyp_t* v_108 = &struct_decl_0->data;
         _fx_free_R17C_form__cdeftyp_t(v_108);
         _fx_copy_R17C_form__cdeftyp_t(&v_85, v_108);

      _fx_catch_11: ;
         _fx_free_R17C_form__cdeftyp_t(&v_85);
         _fx_free_R17C_form__ctprops_t(&v_84);
         if (v_83) {
            _fx_free_N14C_form__ctyp_t(&v_83);
         }
         if (v_82) {
            _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&v_82);
         }
         _fx_free_R17C_form__cdeffun_t(&v_81);
         if (v_80) {
            _fx_free_LN15C_form__cstmt_t(&v_80);
         }
         _fx_free_R17C_form__cdeffun_t(&v_79);
         if (v_78) {
            _fx_free_LN15C_form__cstmt_t(&v_78);
         }
         if (v_77) {
            _fx_free_N15C_form__cstmt_t(&v_77);
         }
         _fx_free_N15C_form__cinfo_t(&v_76);
         if (mkrec_decl_0) {
            _fx_free_rR17C_form__cdeffun_t(&mkrec_decl_0);
         }
         _fx_free_R17C_form__cdeffun_t(&v_75);
         if (v_74) {
            _fx_free_LN15C_form__cstmt_t(&v_74);
         }
         if (v_73) {
            _fx_free_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_73);
         }
         FX_FREE_STR(&v_72);
         if (make_args_4) {
            _fx_free_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&make_args_4);
         }
         _fx_free_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_71);
         FX_FREE_LIST_SIMPLE(&v_70);
         if (v_69) {
            _fx_free_N14C_form__ctyp_t(&v_69);
         }
         FX_FREE_LIST_SIMPLE(&mkrecl_0);
         if (make_args_3) {
            _fx_free_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&make_args_3);
         }
         if (relems_3) {
            _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&relems_3);
         }
         if (make_code_3) {
            _fx_free_LN15C_form__cstmt_t(&make_code_3);
         }
         if (copy_code_3) {
            _fx_free_LN15C_form__cstmt_t(&copy_code_3);
         }
         if (free_code_3) {
            _fx_free_LN15C_form__cstmt_t(&free_code_3);
         }
         _fx_free_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
            &v_68);
         if (relems_2) {
            _fx_free_LT2R9Ast__id_tN14K_form__ktyp_t(&relems_2);
         }
         _fx_free_T5LN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_tLT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(
            &__fold_result___1);
      }
      else if (tag_1 == 19) {
         _fx_N14C_form__ctyp_t ct_hd_0 = 0;
         _fx_T2R9Ast__id_tN14C_form__ctyp_t v_109 = {0};
         _fx_T2R9Ast__id_tN14C_form__ctyp_t v_110 = {0};
         _fx_T2R9Ast__id_tN14C_form__ctyp_t v_111 = {0};
         _fx_LT2R9Ast__id_tN14C_form__ctyp_t v_112 = 0;
         _fx_LT2R9Ast__id_tN14C_form__ctyp_t relems_5 = 0;
         _fx_N14C_form__cexp_t f_0 = 0;
         _fx_N14C_form__cexp_t tn_arg_0 = 0;
         _fx_T2BNt6option1N14C_form__cexp_t v_113 = {0};
         _fx_N14C_form__cexp_t free_hd_f_0 = 0;
         _fx_LN14C_form__cexp_t v_114 = 0;
         _fx_T2N14C_form__ctyp_tR10Ast__loc_t v_115 = {0};
         _fx_N14C_form__cexp_t v_116 = 0;
         _fx_N15C_form__cstmt_t v_117 = 0;
         _fx_LN15C_form__cstmt_t free_code_6 = 0;
         _fx_R17C_form__cdeffun_t v_118 = {0};
         _fx_N14C_form__cexp_t make_list_m_0 = 0;
         _fx_T2BNt6option1N14C_form__cexp_t v_119 = {0};
         _fx_T2BN14C_form__cexp_t v_120 = {0};
         _fx_N14C_form__cexp_t copy_hd_f_0 = 0;
         _fx_T2N14C_form__ctyp_tLN19C_form__carg_attr_t v_121 = {0};
         _fx_N14C_form__ctyp_t v_122 = 0;
         _fx_LN19C_form__carg_attr_t v_123 = 0;
         _fx_N14C_form__ctyp_t ct_hd_arg_0 = 0;
         _fx_LN19C_form__carg_attr_t hd_arg_flags_0 = 0;
         _fx_N14C_form__ctyp_t v_124 = 0;
         _fx_N14C_form__cexp_t v_125 = 0;
         _fx_LN14C_form__cexp_t v_126 = 0;
         _fx_T2N14C_form__ctyp_tR10Ast__loc_t v_127 = {0};
         _fx_N14C_form__cexp_t v_128 = 0;
         _fx_N15C_form__cstmt_t v_129 = 0;
         _fx_LN15C_form__cstmt_t make_list_body_0 = 0;
         fx_str_t v_130 = {0};
         _fx_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t v_131 = {0};
         _fx_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t v_132 = {0};
         _fx_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t v_133 = {0};
         _fx_N14C_form__ctyp_t v_134 = 0;
         _fx_LN19C_form__carg_attr_t v_135 = 0;
         _fx_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t v_136 = {0};
         _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t v_137 = 0;
         _fx_R17C_form__cdeffun_t v_138 = {0};
         _fx_rR17C_form__cdeffun_t cons_decl_0 = 0;
         _fx_N15C_form__cinfo_t v_139 = {0};
         _fx_N15C_form__cstmt_t v_140 = 0;
         _fx_N14C_form__ctyp_t v_141 = 0;
         _fx_N14C_form__ctyp_t v_142 = 0;
         _fx_LR9Ast__id_t v_143 = 0;
         _fx_R17C_form__ctprops_t v_144 = {0};
         _fx_R17C_form__cdeftyp_t v_145 = {0};
         FX_CALL(
            _fx_M11C_gen_typesFM9ktyp2ctypN14C_form__ctyp_t2N14K_form__ktyp_tR10Ast__loc_t(kt_typ_0->u.KTypList, &kt_loc_0,
               &ct_hd_0, 0), _fx_catch_14);
         _fx_R9Ast__id_t free_f_1 = ct_props_0.ctp_free.t1;
         _fx_R9Ast__id_t v_146;
         fx_str_t slit_11 = FX_MAKE_STR("rc");
         FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&slit_11, &v_146, 0), _fx_catch_14);
         _fx_make_T2R9Ast__id_tN14C_form__ctyp_t(&v_146, _fx_g20C_gen_types__CTypInt, &v_109);
         _fx_R9Ast__id_t v_147;
         fx_str_t slit_12 = FX_MAKE_STR("tl");
         FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&slit_12, &v_147, 0), _fx_catch_14);
         _fx_make_T2R9Ast__id_tN14C_form__ctyp_t(&v_147, fx_result_ct_0, &v_110);
         _fx_R9Ast__id_t v_148;
         fx_str_t slit_13 = FX_MAKE_STR("hd");
         FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&slit_13, &v_148, 0), _fx_catch_14);
         _fx_make_T2R9Ast__id_tN14C_form__ctyp_t(&v_148, ct_hd_0, &v_111);
         FX_CALL(_fx_cons_LT2R9Ast__id_tN14C_form__ctyp_t(&v_111, 0, true, &v_112), _fx_catch_14);
         FX_CALL(_fx_cons_LT2R9Ast__id_tN14C_form__ctyp_t(&v_110, v_112, false, &v_112), _fx_catch_14);
         FX_CALL(_fx_cons_LT2R9Ast__id_tN14C_form__ctyp_t(&v_109, v_112, true, &relems_5), _fx_catch_14);
         bool res_0;
         FX_CALL(_fx_M3AstFM6__eq__B2RM4id_tRM4id_t(&free_f_1, &_fx_g9Ast__noid, &res_0, 0), _fx_catch_14);
         _fx_Ta2R9Ast__id_t v_149;
         if (res_0) {
            _fx_Ta2R9Ast__id_t tup_0 = { _fx_g31C_form__std_FX_FREE_LIST_SIMPLE, _fx_g31C_form__std_fx_free_list_simple };
            v_149 = tup_0;
         }
         else {
            FX_CALL(
               _fx_M6C_formFM11make_id_expN14C_form__cexp_t2R9Ast__id_tR10Ast__loc_t(&_fx_g29C_form__std_FX_FREE_LIST_IMPL,
                  loc_0, &f_0, 0), _fx_catch_14);
            FX_CALL(_fx_M6C_formFM11make_id_expN14C_form__cexp_t2R9Ast__id_tR10Ast__loc_t(tn_0, loc_0, &tn_arg_0, 0),
               _fx_catch_14);
            FX_CALL(
               _fx_M11C_gen_typesFM10get_free_fT2BNt6option1N14C_form__cexp_t4N14C_form__ctyp_tBBR10Ast__loc_t(ct_hd_0, true,
                  false, loc_0, &v_113, 0), _fx_catch_14);
            _fx_Nt6option1N14C_form__cexp_t* v_150 = &v_113.t1;
            if (v_150->tag == 2) {
               FX_COPY_PTR(v_150->u.Some, &free_hd_f_0);
            }
            else {
               fx_str_t v_151 = {0};
               fx_str_t v_152 = {0};
               fx_str_t v_153 = {0};
               fx_exn_t v_154 = {0};
               FX_CALL(_fx_M6K_formFM13get_idk_cnameS2R9Ast__id_tR10Ast__loc_t(tn_0, loc_0, &v_151, 0), _fx_catch_12);
               FX_CALL(_fx_M11C_gen_typesFM6stringS1S(&v_151, &v_152, 0), _fx_catch_12);
               fx_str_t slit_14 = FX_MAKE_STR("unexpected element destructor when converting ");
               {
                  const fx_str_t strs_6[] = { slit_14, v_152 };
                  FX_CALL(fx_strjoin(0, 0, 0, strs_6, 2, &v_153), _fx_catch_12);
               }
               FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(loc_0, &v_153, &v_154, 0), _fx_catch_12);
               FX_THROW(&v_154, false, _fx_catch_12);

            _fx_catch_12: ;
               fx_free_exn(&v_154);
               FX_FREE_STR(&v_153);
               FX_FREE_STR(&v_152);
               FX_FREE_STR(&v_151);
            }
            FX_CHECK_EXN(_fx_catch_14);
            FX_CALL(_fx_cons_LN14C_form__cexp_t(free_hd_f_0, 0, true, &v_114), _fx_catch_14);
            FX_CALL(_fx_cons_LN14C_form__cexp_t(tn_arg_0, v_114, false, &v_114), _fx_catch_14);
            _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(_fx_g21C_gen_types__CTypVoid, loc_0, &v_115);
            FX_CALL(
               _fx_M6C_formFM8CExpCallN14C_form__cexp_t3N14C_form__cexp_tLN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(f_0,
                  v_114, &v_115, &v_116), _fx_catch_14);
            FX_CALL(_fx_M6C_formFM4CExpN15C_form__cstmt_t1N14C_form__cexp_t(v_116, &v_117), _fx_catch_14);
            FX_CALL(_fx_cons_LN15C_form__cstmt_t(v_117, 0, true, &free_code_6), _fx_catch_14);
            _fx_R17C_form__cdeffun_t* v_155 = &freef_decl_0->data;
            _fx_make_R17C_form__cdeffun_t(&v_155->cf_name, &v_155->cf_cname, v_155->cf_args, v_155->cf_rt, free_code_6,
               &v_155->cf_flags, v_155->cf_scope, &v_155->cf_loc, &v_118);
            _fx_R17C_form__cdeffun_t* v_156 = &freef_decl_0->data;
            _fx_free_R17C_form__cdeffun_t(v_156);
            _fx_copy_R17C_form__cdeffun_t(&v_118, v_156);
            _fx_Ta2R9Ast__id_t tup_1 = { _fx_g9Ast__noid, free_f_1 };
            v_149 = tup_1;
         }
         _fx_R9Ast__id_t free_m_0 = v_149.t0;
         _fx_R9Ast__id_t free_f_2 = v_149.t1;
         _fx_R9Ast__id_t cons_id_0;
         fx_str_t slit_15 = FX_MAKE_STR("cons");
         FX_CALL(_fx_M6C_formFM7gen_idcR9Ast__id_t2iS(*curr_cm_idx_0, &slit_15, &cons_id_0, 0), _fx_catch_14);
         FX_CALL(
            _fx_M6C_formFM11make_id_expN14C_form__cexp_t2R9Ast__id_tR10Ast__loc_t(&_fx_g29C_form__std_FX_MAKE_LIST_IMPL,
               &kt_loc_0, &make_list_m_0, 0), _fx_catch_14);
         FX_CALL(
            _fx_M11C_gen_typesFM10get_copy_fT2BNt6option1N14C_form__cexp_t4N14C_form__ctyp_tBBR10Ast__loc_t(ct_hd_0, false,
               true, loc_0, &v_119, 0), _fx_catch_14);
         _fx_Nt6option1N14C_form__cexp_t* v_157 = &v_119.t1;
         if (v_157->tag == 2) {
            _fx_make_T2BN14C_form__cexp_t(v_119.t0, v_157->u.Some, &v_120);
         }
         else {
            fx_str_t v_158 = {0};
            fx_str_t v_159 = {0};
            fx_str_t v_160 = {0};
            fx_exn_t v_161 = {0};
            FX_CALL(_fx_M6K_formFM13get_idk_cnameS2R9Ast__id_tR10Ast__loc_t(tn_0, loc_0, &v_158, 0), _fx_catch_13);
            FX_CALL(_fx_M11C_gen_typesFM6stringS1S(&v_158, &v_159, 0), _fx_catch_13);
            fx_str_t slit_16 = FX_MAKE_STR("missing element copy operator when converting ");
            {
               const fx_str_t strs_7[] = { slit_16, v_159 };
               FX_CALL(fx_strjoin(0, 0, 0, strs_7, 2, &v_160), _fx_catch_13);
            }
            FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(loc_0, &v_160, &v_161, 0), _fx_catch_13);
            FX_THROW(&v_161, false, _fx_catch_13);

         _fx_catch_13: ;
            fx_free_exn(&v_161);
            FX_FREE_STR(&v_160);
            FX_FREE_STR(&v_159);
            FX_FREE_STR(&v_158);
         }
         FX_CHECK_EXN(_fx_catch_14);
         bool pass_by_ref_0 = v_120.t0;
         FX_COPY_PTR(v_120.t1, &copy_hd_f_0);
         if (pass_by_ref_0) {
            FX_CALL(_fx_M6C_formFM14make_const_ptrN14C_form__ctyp_t1N14C_form__ctyp_t(ct_hd_0, &v_122, 0), _fx_catch_14);
            FX_CALL(_fx_cons_LN19C_form__carg_attr_t(&_fx_g26C_gen_types__CArgPassByPtr, 0, true, &v_123), _fx_catch_14);
            _fx_make_T2N14C_form__ctyp_tLN19C_form__carg_attr_t(v_122, v_123, &v_121);
         }
         else {
            _fx_make_T2N14C_form__ctyp_tLN19C_form__carg_attr_t(ct_hd_0, 0, &v_121);
         }
         FX_COPY_PTR(v_121.t0, &ct_hd_arg_0);
         FX_COPY_PTR(v_121.t1, &hd_arg_flags_0);
         FX_CALL(_fx_M6C_formFM8CTypNameN14C_form__ctyp_t1R9Ast__id_t(tn_0, &v_124), _fx_catch_14);
         FX_CALL(_fx_M6C_formFM7CExpTypN14C_form__cexp_t2N14C_form__ctyp_tR10Ast__loc_t(v_124, loc_0, &v_125), _fx_catch_14);
         FX_CALL(_fx_cons_LN14C_form__cexp_t(copy_hd_f_0, 0, true, &v_126), _fx_catch_14);
         FX_CALL(_fx_cons_LN14C_form__cexp_t(v_125, v_126, false, &v_126), _fx_catch_14);
         _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(_fx_g20C_gen_types__CTypInt, loc_0, &v_127);
         FX_CALL(
            _fx_M6C_formFM8CExpCallN14C_form__cexp_t3N14C_form__cexp_tLN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
               make_list_m_0, v_126, &v_127, &v_128), _fx_catch_14);
         FX_CALL(_fx_M6C_formFM4CExpN15C_form__cstmt_t1N14C_form__cexp_t(v_128, &v_129), _fx_catch_14);
         FX_CALL(_fx_cons_LN15C_form__cstmt_t(v_129, 0, true, &make_list_body_0), _fx_catch_14);
         fx_str_t slit_17 = FX_MAKE_STR("_fx_cons_");
         {
            const fx_str_t strs_8[] = { slit_17, tp_cname_wo_prefix_0 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_8, 2, &v_130), _fx_catch_14);
         }
         _fx_R9Ast__id_t v_162;
         fx_str_t slit_18 = FX_MAKE_STR("hd");
         FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&slit_18, &v_162, 0), _fx_catch_14);
         _fx_make_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_162, ct_hd_arg_0, hd_arg_flags_0, &v_131);
         _fx_R9Ast__id_t v_163;
         fx_str_t slit_19 = FX_MAKE_STR("tl");
         FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&slit_19, &v_163, 0), _fx_catch_14);
         _fx_make_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_163, fx_result_ct_0, 0, &v_132);
         _fx_R9Ast__id_t v_164;
         fx_str_t slit_20 = FX_MAKE_STR("addref_tl");
         FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&slit_20, &v_164, 0), _fx_catch_14);
         _fx_make_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_164, _fx_g21C_gen_types__CTypBool, 0, &v_133);
         FX_CALL(_fx_M6C_formFM8make_ptrN14C_form__ctyp_t1N14C_form__ctyp_t(fx_result_ct_0, &v_134, 0), _fx_catch_14);
         FX_CALL(_fx_cons_LN19C_form__carg_attr_t(&_fx_g23C_gen_types__CArgRetVal, 0, true, &v_135), _fx_catch_14);
         FX_CALL(_fx_cons_LN19C_form__carg_attr_t(&_fx_g26C_gen_types__CArgPassByPtr, v_135, false, &v_135), _fx_catch_14);
         _fx_make_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&fx_result_id_0, v_134, v_135, &v_136);
         FX_CALL(_fx_cons_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_136, 0, true, &v_137), _fx_catch_14);
         FX_CALL(_fx_cons_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_133, v_137, false, &v_137), _fx_catch_14);
         FX_CALL(_fx_cons_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_132, v_137, false, &v_137), _fx_catch_14);
         FX_CALL(_fx_cons_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_131, v_137, false, &v_137), _fx_catch_14);
         _fx_R16Ast__fun_flags_t v_165;
         FX_CALL(_fx_M3AstFM17default_fun_flagsRM11fun_flags_t0(&v_165, 0), _fx_catch_14);
         _fx_R16Ast__fun_flags_t v_166 =
            { v_165.fun_flag_pure, v_165.fun_flag_ccode, v_165.fun_flag_have_keywords, v_165.fun_flag_inline,
               v_165.fun_flag_nothrow, v_165.fun_flag_really_nothrow, true, v_165.fun_flag_ctor, v_165.fun_flag_method_of,
               v_165.fun_flag_uses_fv, v_165.fun_flag_recursive, v_165.fun_flag_instance };
         _fx_make_R17C_form__cdeffun_t(&cons_id_0, &v_130, v_137, _fx_g21C_gen_types__CTypCInt, make_list_body_0, &v_166, 0,
            loc_0, &v_138);
         FX_CALL(_fx_make_rR17C_form__cdeffun_t(&v_138, &cons_decl_0), _fx_catch_14);
         _fx_M6C_formFM4CFunN15C_form__cinfo_t1rRM9cdeffun_t(cons_decl_0, &v_139);
         FX_CALL(_fx_M6C_formFM13set_idc_entryv2R9Ast__id_tN15C_form__cinfo_t(&cons_id_0, &v_139, 0), _fx_catch_14);
         FX_CALL(_fx_M6C_formFM7CDefFunN15C_form__cstmt_t1rRM9cdeffun_t(cons_decl_0, &v_140), _fx_catch_14);
         FX_CALL(
            _fx_M11C_gen_typesFM8add_declv5R9Ast__id_tN15C_form__cstmt_trRt6Set__t1R9Ast__id_trLN15C_form__cstmt_trLN15C_form__cstmt_t(
               &cons_id_0, v_140, all_decls_ref_0, top_typ_decl_ref_0, top_typfun_decl_ref_0, 0), _fx_catch_14);
         _fx_R17C_form__cdeftyp_t* v_167 = &struct_decl_0->data;
         FX_CALL(
            _fx_M6C_formFM10CTypStructN14C_form__ctyp_t2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t(&struct_id_opt_1,
               relems_5, &v_141), _fx_catch_14);
         FX_CALL(_fx_M6C_formFM8make_ptrN14C_form__ctyp_t1N14C_form__ctyp_t(v_141, &v_142, 0), _fx_catch_14);
         FX_CALL(_fx_cons_LR9Ast__id_t(&cons_id_0, 0, true, &v_143), _fx_catch_14);
         _fx_Ta2R9Ast__id_t v_168 = { free_m_0, free_f_2 };
         _fx_make_R17C_form__ctprops_t(ct_props_0.ctp_scalar, ct_props_0.ctp_complex, ct_props_0.ctp_ptr,
            ct_props_0.ctp_pass_by_ref, v_143, &v_168, &ct_props_0.ctp_copy, &v_144);
         _fx_make_R17C_form__cdeftyp_t(&v_167->ct_name, v_142, &v_167->ct_cname, &v_144, v_167->ct_data_start, &v_167->ct_enum,
            v_167->ct_ifaces, &v_167->ct_ifaces_id, v_167->ct_scope, &v_167->ct_loc, &v_145);
         _fx_R17C_form__cdeftyp_t* v_169 = &struct_decl_0->data;
         _fx_free_R17C_form__cdeftyp_t(v_169);
         _fx_copy_R17C_form__cdeftyp_t(&v_145, v_169);

      _fx_catch_14: ;
         _fx_free_R17C_form__cdeftyp_t(&v_145);
         _fx_free_R17C_form__ctprops_t(&v_144);
         FX_FREE_LIST_SIMPLE(&v_143);
         if (v_142) {
            _fx_free_N14C_form__ctyp_t(&v_142);
         }
         if (v_141) {
            _fx_free_N14C_form__ctyp_t(&v_141);
         }
         if (v_140) {
            _fx_free_N15C_form__cstmt_t(&v_140);
         }
         _fx_free_N15C_form__cinfo_t(&v_139);
         if (cons_decl_0) {
            _fx_free_rR17C_form__cdeffun_t(&cons_decl_0);
         }
         _fx_free_R17C_form__cdeffun_t(&v_138);
         if (v_137) {
            _fx_free_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_137);
         }
         _fx_free_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_136);
         FX_FREE_LIST_SIMPLE(&v_135);
         if (v_134) {
            _fx_free_N14C_form__ctyp_t(&v_134);
         }
         _fx_free_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_133);
         _fx_free_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_132);
         _fx_free_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_131);
         FX_FREE_STR(&v_130);
         if (make_list_body_0) {
            _fx_free_LN15C_form__cstmt_t(&make_list_body_0);
         }
         if (v_129) {
            _fx_free_N15C_form__cstmt_t(&v_129);
         }
         if (v_128) {
            _fx_free_N14C_form__cexp_t(&v_128);
         }
         _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&v_127);
         if (v_126) {
            _fx_free_LN14C_form__cexp_t(&v_126);
         }
         if (v_125) {
            _fx_free_N14C_form__cexp_t(&v_125);
         }
         if (v_124) {
            _fx_free_N14C_form__ctyp_t(&v_124);
         }
         FX_FREE_LIST_SIMPLE(&hd_arg_flags_0);
         if (ct_hd_arg_0) {
            _fx_free_N14C_form__ctyp_t(&ct_hd_arg_0);
         }
         FX_FREE_LIST_SIMPLE(&v_123);
         if (v_122) {
            _fx_free_N14C_form__ctyp_t(&v_122);
         }
         _fx_free_T2N14C_form__ctyp_tLN19C_form__carg_attr_t(&v_121);
         if (copy_hd_f_0) {
            _fx_free_N14C_form__cexp_t(&copy_hd_f_0);
         }
         _fx_free_T2BN14C_form__cexp_t(&v_120);
         _fx_free_T2BNt6option1N14C_form__cexp_t(&v_119);
         if (make_list_m_0) {
            _fx_free_N14C_form__cexp_t(&make_list_m_0);
         }
         _fx_free_R17C_form__cdeffun_t(&v_118);
         if (free_code_6) {
            _fx_free_LN15C_form__cstmt_t(&free_code_6);
         }
         if (v_117) {
            _fx_free_N15C_form__cstmt_t(&v_117);
         }
         if (v_116) {
            _fx_free_N14C_form__cexp_t(&v_116);
         }
         _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&v_115);
         if (v_114) {
            _fx_free_LN14C_form__cexp_t(&v_114);
         }
         if (free_hd_f_0) {
            _fx_free_N14C_form__cexp_t(&free_hd_f_0);
         }
         _fx_free_T2BNt6option1N14C_form__cexp_t(&v_113);
         if (tn_arg_0) {
            _fx_free_N14C_form__cexp_t(&tn_arg_0);
         }
         if (f_0) {
            _fx_free_N14C_form__cexp_t(&f_0);
         }
         if (relems_5) {
            _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&relems_5);
         }
         if (v_112) {
            _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&v_112);
         }
         _fx_free_T2R9Ast__id_tN14C_form__ctyp_t(&v_111);
         _fx_free_T2R9Ast__id_tN14C_form__ctyp_t(&v_110);
         _fx_free_T2R9Ast__id_tN14C_form__ctyp_t(&v_109);
         if (ct_hd_0) {
            _fx_free_N14C_form__ctyp_t(&ct_hd_0);
         }
      }
      else if (tag_1 == 20) {
         _fx_N14C_form__ctyp_t ctyp_0 = 0;
         _fx_T2R9Ast__id_tN14C_form__ctyp_t v_170 = {0};
         _fx_T2R9Ast__id_tN14C_form__ctyp_t v_171 = {0};
         _fx_LT2R9Ast__id_tN14C_form__ctyp_t v_172 = 0;
         _fx_LT2R9Ast__id_tN14C_form__ctyp_t relems_6 = 0;
         _fx_N14C_form__cexp_t f_1 = 0;
         _fx_N14C_form__cexp_t tn_arg_1 = 0;
         _fx_T2BNt6option1N14C_form__cexp_t v_173 = {0};
         _fx_N14C_form__cexp_t free_hd_f_1 = 0;
         _fx_LN14C_form__cexp_t v_174 = 0;
         _fx_T2N14C_form__ctyp_tR10Ast__loc_t v_175 = {0};
         _fx_N14C_form__cexp_t v_176 = 0;
         _fx_N15C_form__cstmt_t v_177 = 0;
         _fx_LN15C_form__cstmt_t free_code_7 = 0;
         _fx_R17C_form__cdeffun_t v_178 = {0};
         _fx_N14C_form__cexp_t mkref_m_0 = 0;
         _fx_T2BNt6option1N14C_form__cexp_t v_179 = {0};
         _fx_T2BN14C_form__cexp_t v_180 = {0};
         _fx_N14C_form__cexp_t copy_data_f_0 = 0;
         _fx_T2N14C_form__ctyp_tLN19C_form__carg_attr_t v_181 = {0};
         _fx_N14C_form__ctyp_t v_182 = 0;
         _fx_LN19C_form__carg_attr_t v_183 = 0;
         _fx_N14C_form__ctyp_t ct_arg_0 = 0;
         _fx_LN19C_form__carg_attr_t ct_arg_flags_0 = 0;
         _fx_N14C_form__ctyp_t v_184 = 0;
         _fx_N14C_form__cexp_t v_185 = 0;
         _fx_LN14C_form__cexp_t v_186 = 0;
         _fx_T2N14C_form__ctyp_tR10Ast__loc_t v_187 = {0};
         _fx_N14C_form__cexp_t v_188 = 0;
         _fx_N15C_form__cstmt_t v_189 = 0;
         _fx_LN15C_form__cstmt_t mkref_body_0 = 0;
         fx_str_t v_190 = {0};
         _fx_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t v_191 = {0};
         _fx_N14C_form__ctyp_t v_192 = 0;
         _fx_LN19C_form__carg_attr_t v_193 = 0;
         _fx_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t v_194 = {0};
         _fx_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t v_195 = 0;
         _fx_R17C_form__cdeffun_t v_196 = {0};
         _fx_rR17C_form__cdeffun_t mkref_decl_0 = 0;
         _fx_N15C_form__cinfo_t v_197 = {0};
         _fx_N15C_form__cstmt_t v_198 = 0;
         _fx_N14C_form__ctyp_t v_199 = 0;
         _fx_N14C_form__ctyp_t v_200 = 0;
         _fx_LR9Ast__id_t v_201 = 0;
         _fx_R17C_form__ctprops_t v_202 = {0};
         _fx_R17C_form__cdeftyp_t v_203 = {0};
         FX_CALL(
            _fx_M11C_gen_typesFM9ktyp2ctypN14C_form__ctyp_t2N14K_form__ktyp_tR10Ast__loc_t(kt_typ_0->u.KTypRef, &kt_loc_0,
               &ctyp_0, 0), _fx_catch_17);
         _fx_R9Ast__id_t free_f_3 = ct_props_0.ctp_free.t1;
         _fx_R9Ast__id_t v_204;
         fx_str_t slit_21 = FX_MAKE_STR("rc");
         FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&slit_21, &v_204, 0), _fx_catch_17);
         _fx_make_T2R9Ast__id_tN14C_form__ctyp_t(&v_204, _fx_g20C_gen_types__CTypInt, &v_170);
         _fx_R9Ast__id_t v_205;
         fx_str_t slit_22 = FX_MAKE_STR("data");
         FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&slit_22, &v_205, 0), _fx_catch_17);
         _fx_make_T2R9Ast__id_tN14C_form__ctyp_t(&v_205, ctyp_0, &v_171);
         FX_CALL(_fx_cons_LT2R9Ast__id_tN14C_form__ctyp_t(&v_171, 0, true, &v_172), _fx_catch_17);
         FX_CALL(_fx_cons_LT2R9Ast__id_tN14C_form__ctyp_t(&v_170, v_172, true, &relems_6), _fx_catch_17);
         bool res_1;
         FX_CALL(_fx_M3AstFM6__eq__B2RM4id_tRM4id_t(&free_f_3, &_fx_g9Ast__noid, &res_1, 0), _fx_catch_17);
         _fx_Ta2R9Ast__id_t v_206;
         if (res_1) {
            _fx_Ta2R9Ast__id_t tup_2 = { _fx_g30C_form__std_FX_FREE_REF_SIMPLE, _fx_g30C_form__std_fx_free_ref_simple };
            v_206 = tup_2;
         }
         else {
            FX_CALL(
               _fx_M6C_formFM11make_id_expN14C_form__cexp_t2R9Ast__id_tR10Ast__loc_t(&_fx_g28C_form__std_FX_FREE_REF_IMPL,
                  loc_0, &f_1, 0), _fx_catch_17);
            FX_CALL(_fx_M6C_formFM11make_id_expN14C_form__cexp_t2R9Ast__id_tR10Ast__loc_t(tn_0, loc_0, &tn_arg_1, 0),
               _fx_catch_17);
            FX_CALL(
               _fx_M11C_gen_typesFM10get_free_fT2BNt6option1N14C_form__cexp_t4N14C_form__ctyp_tBBR10Ast__loc_t(ctyp_0, true,
                  false, loc_0, &v_173, 0), _fx_catch_17);
            _fx_Nt6option1N14C_form__cexp_t* v_207 = &v_173.t1;
            if (v_207->tag == 2) {
               FX_COPY_PTR(v_207->u.Some, &free_hd_f_1);
            }
            else {
               fx_str_t v_208 = {0};
               fx_str_t v_209 = {0};
               fx_str_t v_210 = {0};
               fx_exn_t v_211 = {0};
               FX_CALL(_fx_M6K_formFM13get_idk_cnameS2R9Ast__id_tR10Ast__loc_t(tn_0, loc_0, &v_208, 0), _fx_catch_15);
               FX_CALL(_fx_M11C_gen_typesFM6stringS1S(&v_208, &v_209, 0), _fx_catch_15);
               fx_str_t slit_23 = FX_MAKE_STR("unexpected element destructor when converting ");
               {
                  const fx_str_t strs_9[] = { slit_23, v_209 };
                  FX_CALL(fx_strjoin(0, 0, 0, strs_9, 2, &v_210), _fx_catch_15);
               }
               FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(loc_0, &v_210, &v_211, 0), _fx_catch_15);
               FX_THROW(&v_211, false, _fx_catch_15);

            _fx_catch_15: ;
               fx_free_exn(&v_211);
               FX_FREE_STR(&v_210);
               FX_FREE_STR(&v_209);
               FX_FREE_STR(&v_208);
            }
            FX_CHECK_EXN(_fx_catch_17);
            FX_CALL(_fx_cons_LN14C_form__cexp_t(free_hd_f_1, 0, true, &v_174), _fx_catch_17);
            FX_CALL(_fx_cons_LN14C_form__cexp_t(tn_arg_1, v_174, false, &v_174), _fx_catch_17);
            _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(_fx_g21C_gen_types__CTypVoid, loc_0, &v_175);
            FX_CALL(
               _fx_M6C_formFM8CExpCallN14C_form__cexp_t3N14C_form__cexp_tLN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(f_1,
                  v_174, &v_175, &v_176), _fx_catch_17);
            FX_CALL(_fx_M6C_formFM4CExpN15C_form__cstmt_t1N14C_form__cexp_t(v_176, &v_177), _fx_catch_17);
            FX_CALL(_fx_cons_LN15C_form__cstmt_t(v_177, 0, true, &free_code_7), _fx_catch_17);
            _fx_R17C_form__cdeffun_t* v_212 = &freef_decl_0->data;
            _fx_make_R17C_form__cdeffun_t(&v_212->cf_name, &v_212->cf_cname, v_212->cf_args, v_212->cf_rt, free_code_7,
               &v_212->cf_flags, v_212->cf_scope, &v_212->cf_loc, &v_178);
            _fx_R17C_form__cdeffun_t* v_213 = &freef_decl_0->data;
            _fx_free_R17C_form__cdeffun_t(v_213);
            _fx_copy_R17C_form__cdeffun_t(&v_178, v_213);
            _fx_Ta2R9Ast__id_t tup_3 = { _fx_g9Ast__noid, free_f_3 };
            v_206 = tup_3;
         }
         _fx_R9Ast__id_t free_m_1 = v_206.t0;
         _fx_R9Ast__id_t free_f_4 = v_206.t1;
         _fx_R9Ast__id_t mkref_id_0;
         fx_str_t slit_24 = FX_MAKE_STR("mkref");
         FX_CALL(_fx_M6C_formFM7gen_idcR9Ast__id_t2iS(*curr_cm_idx_0, &slit_24, &mkref_id_0, 0), _fx_catch_17);
         FX_CALL(
            _fx_M6C_formFM11make_id_expN14C_form__cexp_t2R9Ast__id_tR10Ast__loc_t(&_fx_g28C_form__std_FX_MAKE_REF_IMPL,
               &kt_loc_0, &mkref_m_0, 0), _fx_catch_17);
         FX_CALL(
            _fx_M11C_gen_typesFM10get_copy_fT2BNt6option1N14C_form__cexp_t4N14C_form__ctyp_tBBR10Ast__loc_t(ctyp_0, false, true,
               loc_0, &v_179, 0), _fx_catch_17);
         _fx_Nt6option1N14C_form__cexp_t* v_214 = &v_179.t1;
         if (v_214->tag == 2) {
            _fx_make_T2BN14C_form__cexp_t(v_179.t0, v_214->u.Some, &v_180);
         }
         else {
            fx_str_t v_215 = {0};
            fx_str_t v_216 = {0};
            fx_str_t v_217 = {0};
            fx_exn_t v_218 = {0};
            FX_CALL(_fx_M6K_formFM13get_idk_cnameS2R9Ast__id_tR10Ast__loc_t(tn_0, loc_0, &v_215, 0), _fx_catch_16);
            FX_CALL(_fx_M11C_gen_typesFM6stringS1S(&v_215, &v_216, 0), _fx_catch_16);
            fx_str_t slit_25 = FX_MAKE_STR("missing element copy operator when converting ");
            {
               const fx_str_t strs_10[] = { slit_25, v_216 };
               FX_CALL(fx_strjoin(0, 0, 0, strs_10, 2, &v_217), _fx_catch_16);
            }
            FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(loc_0, &v_217, &v_218, 0), _fx_catch_16);
            FX_THROW(&v_218, false, _fx_catch_16);

         _fx_catch_16: ;
            fx_free_exn(&v_218);
            FX_FREE_STR(&v_217);
            FX_FREE_STR(&v_216);
            FX_FREE_STR(&v_215);
         }
         FX_CHECK_EXN(_fx_catch_17);
         bool pass_by_ref_1 = v_180.t0;
         FX_COPY_PTR(v_180.t1, &copy_data_f_0);
         if (pass_by_ref_1) {
            FX_CALL(_fx_M6C_formFM14make_const_ptrN14C_form__ctyp_t1N14C_form__ctyp_t(ctyp_0, &v_182, 0), _fx_catch_17);
            FX_CALL(_fx_cons_LN19C_form__carg_attr_t(&_fx_g26C_gen_types__CArgPassByPtr, 0, true, &v_183), _fx_catch_17);
            _fx_make_T2N14C_form__ctyp_tLN19C_form__carg_attr_t(v_182, v_183, &v_181);
         }
         else {
            _fx_make_T2N14C_form__ctyp_tLN19C_form__carg_attr_t(ctyp_0, 0, &v_181);
         }
         FX_COPY_PTR(v_181.t0, &ct_arg_0);
         FX_COPY_PTR(v_181.t1, &ct_arg_flags_0);
         FX_CALL(_fx_M6C_formFM8CTypNameN14C_form__ctyp_t1R9Ast__id_t(tn_0, &v_184), _fx_catch_17);
         FX_CALL(_fx_M6C_formFM7CExpTypN14C_form__cexp_t2N14C_form__ctyp_tR10Ast__loc_t(v_184, loc_0, &v_185), _fx_catch_17);
         FX_CALL(_fx_cons_LN14C_form__cexp_t(copy_data_f_0, 0, true, &v_186), _fx_catch_17);
         FX_CALL(_fx_cons_LN14C_form__cexp_t(v_185, v_186, false, &v_186), _fx_catch_17);
         _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(_fx_g20C_gen_types__CTypInt, loc_0, &v_187);
         FX_CALL(
            _fx_M6C_formFM8CExpCallN14C_form__cexp_t3N14C_form__cexp_tLN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
               mkref_m_0, v_186, &v_187, &v_188), _fx_catch_17);
         FX_CALL(_fx_M6C_formFM4CExpN15C_form__cstmt_t1N14C_form__cexp_t(v_188, &v_189), _fx_catch_17);
         FX_CALL(_fx_cons_LN15C_form__cstmt_t(v_189, 0, true, &mkref_body_0), _fx_catch_17);
         fx_str_t slit_26 = FX_MAKE_STR("_fx_make_");
         {
            const fx_str_t strs_11[] = { slit_26, tp_cname_wo_prefix_0 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_11, 2, &v_190), _fx_catch_17);
         }
         _fx_R9Ast__id_t v_219;
         fx_str_t slit_27 = FX_MAKE_STR("arg");
         FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&slit_27, &v_219, 0), _fx_catch_17);
         _fx_make_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_219, ct_arg_0, ct_arg_flags_0, &v_191);
         FX_CALL(_fx_M6C_formFM8make_ptrN14C_form__ctyp_t1N14C_form__ctyp_t(fx_result_ct_0, &v_192, 0), _fx_catch_17);
         FX_CALL(_fx_cons_LN19C_form__carg_attr_t(&_fx_g23C_gen_types__CArgRetVal, 0, true, &v_193), _fx_catch_17);
         FX_CALL(_fx_cons_LN19C_form__carg_attr_t(&_fx_g26C_gen_types__CArgPassByPtr, v_193, false, &v_193), _fx_catch_17);
         _fx_make_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&fx_result_id_0, v_192, v_193, &v_194);
         FX_CALL(_fx_cons_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_194, 0, true, &v_195), _fx_catch_17);
         FX_CALL(_fx_cons_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_191, v_195, false, &v_195), _fx_catch_17);
         _fx_R16Ast__fun_flags_t v_220;
         FX_CALL(_fx_M3AstFM17default_fun_flagsRM11fun_flags_t0(&v_220, 0), _fx_catch_17);
         _fx_R16Ast__fun_flags_t v_221 =
            { v_220.fun_flag_pure, v_220.fun_flag_ccode, v_220.fun_flag_have_keywords, v_220.fun_flag_inline,
               v_220.fun_flag_nothrow, v_220.fun_flag_really_nothrow, true, v_220.fun_flag_ctor, v_220.fun_flag_method_of,
               v_220.fun_flag_uses_fv, v_220.fun_flag_recursive, v_220.fun_flag_instance };
         _fx_make_R17C_form__cdeffun_t(&mkref_id_0, &v_190, v_195, _fx_g21C_gen_types__CTypCInt, mkref_body_0, &v_221, 0, loc_0,
            &v_196);
         FX_CALL(_fx_make_rR17C_form__cdeffun_t(&v_196, &mkref_decl_0), _fx_catch_17);
         _fx_M6C_formFM4CFunN15C_form__cinfo_t1rRM9cdeffun_t(mkref_decl_0, &v_197);
         FX_CALL(_fx_M6C_formFM13set_idc_entryv2R9Ast__id_tN15C_form__cinfo_t(&mkref_id_0, &v_197, 0), _fx_catch_17);
         FX_CALL(_fx_M6C_formFM7CDefFunN15C_form__cstmt_t1rRM9cdeffun_t(mkref_decl_0, &v_198), _fx_catch_17);
         FX_CALL(
            _fx_M11C_gen_typesFM8add_declv5R9Ast__id_tN15C_form__cstmt_trRt6Set__t1R9Ast__id_trLN15C_form__cstmt_trLN15C_form__cstmt_t(
               &mkref_id_0, v_198, all_decls_ref_0, top_typ_decl_ref_0, top_typfun_decl_ref_0, 0), _fx_catch_17);
         _fx_R17C_form__cdeftyp_t* v_222 = &struct_decl_0->data;
         FX_CALL(
            _fx_M6C_formFM10CTypStructN14C_form__ctyp_t2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t(&struct_id_opt_1,
               relems_6, &v_199), _fx_catch_17);
         FX_CALL(_fx_M6C_formFM8make_ptrN14C_form__ctyp_t1N14C_form__ctyp_t(v_199, &v_200, 0), _fx_catch_17);
         FX_CALL(_fx_cons_LR9Ast__id_t(&mkref_id_0, 0, true, &v_201), _fx_catch_17);
         _fx_Ta2R9Ast__id_t v_223 = { free_m_1, free_f_4 };
         _fx_make_R17C_form__ctprops_t(ct_props_0.ctp_scalar, ct_props_0.ctp_complex, ct_props_0.ctp_ptr,
            ct_props_0.ctp_pass_by_ref, v_201, &v_223, &ct_props_0.ctp_copy, &v_202);
         _fx_make_R17C_form__cdeftyp_t(&v_222->ct_name, v_200, &v_222->ct_cname, &v_202, v_222->ct_data_start, &v_222->ct_enum,
            v_222->ct_ifaces, &v_222->ct_ifaces_id, v_222->ct_scope, &v_222->ct_loc, &v_203);
         _fx_R17C_form__cdeftyp_t* v_224 = &struct_decl_0->data;
         _fx_free_R17C_form__cdeftyp_t(v_224);
         _fx_copy_R17C_form__cdeftyp_t(&v_203, v_224);

      _fx_catch_17: ;
         _fx_free_R17C_form__cdeftyp_t(&v_203);
         _fx_free_R17C_form__ctprops_t(&v_202);
         FX_FREE_LIST_SIMPLE(&v_201);
         if (v_200) {
            _fx_free_N14C_form__ctyp_t(&v_200);
         }
         if (v_199) {
            _fx_free_N14C_form__ctyp_t(&v_199);
         }
         if (v_198) {
            _fx_free_N15C_form__cstmt_t(&v_198);
         }
         _fx_free_N15C_form__cinfo_t(&v_197);
         if (mkref_decl_0) {
            _fx_free_rR17C_form__cdeffun_t(&mkref_decl_0);
         }
         _fx_free_R17C_form__cdeffun_t(&v_196);
         if (v_195) {
            _fx_free_LT3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_195);
         }
         _fx_free_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_194);
         FX_FREE_LIST_SIMPLE(&v_193);
         if (v_192) {
            _fx_free_N14C_form__ctyp_t(&v_192);
         }
         _fx_free_T3R9Ast__id_tN14C_form__ctyp_tLN19C_form__carg_attr_t(&v_191);
         FX_FREE_STR(&v_190);
         if (mkref_body_0) {
            _fx_free_LN15C_form__cstmt_t(&mkref_body_0);
         }
         if (v_189) {
            _fx_free_N15C_form__cstmt_t(&v_189);
         }
         if (v_188) {
            _fx_free_N14C_form__cexp_t(&v_188);
         }
         _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&v_187);
         if (v_186) {
            _fx_free_LN14C_form__cexp_t(&v_186);
         }
         if (v_185) {
            _fx_free_N14C_form__cexp_t(&v_185);
         }
         if (v_184) {
            _fx_free_N14C_form__ctyp_t(&v_184);
         }
         FX_FREE_LIST_SIMPLE(&ct_arg_flags_0);
         if (ct_arg_0) {
            _fx_free_N14C_form__ctyp_t(&ct_arg_0);
         }
         FX_FREE_LIST_SIMPLE(&v_183);
         if (v_182) {
            _fx_free_N14C_form__ctyp_t(&v_182);
         }
         _fx_free_T2N14C_form__ctyp_tLN19C_form__carg_attr_t(&v_181);
         if (copy_data_f_0) {
            _fx_free_N14C_form__cexp_t(&copy_data_f_0);
         }
         _fx_free_T2BN14C_form__cexp_t(&v_180);
         _fx_free_T2BNt6option1N14C_form__cexp_t(&v_179);
         if (mkref_m_0) {
            _fx_free_N14C_form__cexp_t(&mkref_m_0);
         }
         _fx_free_R17C_form__cdeffun_t(&v_178);
         if (free_code_7) {
            _fx_free_LN15C_form__cstmt_t(&free_code_7);
         }
         if (v_177) {
            _fx_free_N15C_form__cstmt_t(&v_177);
         }
         if (v_176) {
            _fx_free_N14C_form__cexp_t(&v_176);
         }
         _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&v_175);
         if (v_174) {
            _fx_free_LN14C_form__cexp_t(&v_174);
         }
         if (free_hd_f_1) {
            _fx_free_N14C_form__cexp_t(&free_hd_f_1);
         }
         _fx_free_T2BNt6option1N14C_form__cexp_t(&v_173);
         if (tn_arg_1) {
            _fx_free_N14C_form__cexp_t(&tn_arg_1);
         }
         if (f_1) {
            _fx_free_N14C_form__cexp_t(&f_1);
         }
         if (relems_6) {
            _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&relems_6);
         }
         if (v_172) {
            _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&v_172);
         }
         _fx_free_T2R9Ast__id_tN14C_form__ctyp_t(&v_171);
         _fx_free_T2R9Ast__id_tN14C_form__ctyp_t(&v_170);
         if (ctyp_0) {
            _fx_free_N14C_form__ctyp_t(&ctyp_0);
         }
      }
      else if (tag_1 == 13) {
         _fx_LN14C_form__ctyp_t cargs_0 = 0;
         _fx_N14C_form__ctyp_t fp_ctyp_0 = 0;
         _fx_N14C_form__ctyp_t v_225 = 0;
         _fx_N14C_form__ctyp_t fv_ctyp_0 = 0;
         _fx_T2R9Ast__id_tN14C_form__ctyp_t v_226 = {0};
         _fx_T2R9Ast__id_tN14C_form__ctyp_t v_227 = {0};
         _fx_LT2R9Ast__id_tN14C_form__ctyp_t v_228 = 0;
         _fx_LT2R9Ast__id_tN14C_form__ctyp_t relems_7 = 0;
         _fx_N14C_form__ctyp_t v_229 = 0;
         _fx_R17C_form__ctprops_t v_230 = {0};
         _fx_R17C_form__cdeftyp_t v_231 = {0};
         _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t* vcase_0 = &kt_typ_0->u.KTypFun;
         FX_CALL(
            _fx_M11C_gen_typesFM15ktyp2ctyp_fargsLN14C_form__ctyp_t3LN14K_form__ktyp_tN14K_form__ktyp_tR10Ast__loc_t(
               vcase_0->t0, vcase_0->t1, loc_0, &cargs_0, 0), _fx_catch_18);
         FX_CALL(
            _fx_M6C_formFM13CTypFunRawPtrN14C_form__ctyp_t2LN14C_form__ctyp_tN14C_form__ctyp_t(cargs_0,
               _fx_g21C_gen_types__CTypCInt, &fp_ctyp_0), _fx_catch_18);
         _fx_R9Ast__id_t v_232;
         fx_str_t slit_28 = FX_MAKE_STR("fx_fcv_t");
         FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&slit_28, &v_232, 0), _fx_catch_18);
         FX_CALL(_fx_M6C_formFM8CTypNameN14C_form__ctyp_t1R9Ast__id_t(&v_232, &v_225), _fx_catch_18);
         FX_CALL(_fx_M6C_formFM8make_ptrN14C_form__ctyp_t1N14C_form__ctyp_t(v_225, &fv_ctyp_0, 0), _fx_catch_18);
         _fx_R9Ast__id_t v_233;
         fx_str_t slit_29 = FX_MAKE_STR("fp");
         FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&slit_29, &v_233, 0), _fx_catch_18);
         _fx_make_T2R9Ast__id_tN14C_form__ctyp_t(&v_233, fp_ctyp_0, &v_226);
         _fx_R9Ast__id_t v_234;
         fx_str_t slit_30 = FX_MAKE_STR("fcv");
         FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&slit_30, &v_234, 0), _fx_catch_18);
         _fx_make_T2R9Ast__id_tN14C_form__ctyp_t(&v_234, fv_ctyp_0, &v_227);
         FX_CALL(_fx_cons_LT2R9Ast__id_tN14C_form__ctyp_t(&v_227, 0, true, &v_228), _fx_catch_18);
         FX_CALL(_fx_cons_LT2R9Ast__id_tN14C_form__ctyp_t(&v_226, v_228, true, &relems_7), _fx_catch_18);
         _fx_R17C_form__cdeftyp_t* v_235 = &struct_decl_0->data;
         FX_CALL(
            _fx_M6C_formFM10CTypStructN14C_form__ctyp_t2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t(&struct_id_opt_1,
               relems_7, &v_229), _fx_catch_18);
         _fx_Ta2R9Ast__id_t v_236 = { _fx_g22C_form__std_FX_FREE_FP, _fx_g22C_form__std_fx_free_fp };
         _fx_Ta2R9Ast__id_t v_237 = { _fx_g22C_form__std_FX_COPY_FP, _fx_g22C_form__std_fx_copy_fp };
         _fx_make_R17C_form__ctprops_t(ct_props_0.ctp_scalar, ct_props_0.ctp_complex, false, true, ct_props_0.ctp_make, &v_236,
            &v_237, &v_230);
         _fx_make_R17C_form__cdeftyp_t(&v_235->ct_name, v_229, &v_235->ct_cname, &v_230, v_235->ct_data_start, &v_235->ct_enum,
            v_235->ct_ifaces, &v_235->ct_ifaces_id, v_235->ct_scope, &v_235->ct_loc, &v_231);
         _fx_R17C_form__cdeftyp_t* v_238 = &struct_decl_0->data;
         _fx_free_R17C_form__cdeftyp_t(v_238);
         _fx_copy_R17C_form__cdeftyp_t(&v_231, v_238);

      _fx_catch_18: ;
         _fx_free_R17C_form__cdeftyp_t(&v_231);
         _fx_free_R17C_form__ctprops_t(&v_230);
         if (v_229) {
            _fx_free_N14C_form__ctyp_t(&v_229);
         }
         if (relems_7) {
            _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&relems_7);
         }
         if (v_228) {
            _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&v_228);
         }
         _fx_free_T2R9Ast__id_tN14C_form__ctyp_t(&v_227);
         _fx_free_T2R9Ast__id_tN14C_form__ctyp_t(&v_226);
         if (fv_ctyp_0) {
            _fx_free_N14C_form__ctyp_t(&fv_ctyp_0);
         }
         if (v_225) {
            _fx_free_N14C_form__ctyp_t(&v_225);
         }
         if (fp_ctyp_0) {
            _fx_free_N14C_form__ctyp_t(&fp_ctyp_0);
         }
         if (cargs_0) {
            _fx_free_LN14C_form__ctyp_t(&cargs_0);
         }
      }
      FX_CHECK_EXN(_fx_catch_19);

   _fx_catch_19: ;
      if (kt_typ_0) {
         _fx_free_N14K_form__ktyp_t(&kt_typ_0);
      }
   }
   else if (tag_0 == 5) {
      _fx_LT2R9Ast__id_tLR9Ast__id_t kvar_ifaces_0 = 0;
      _fx_LT2R9Ast__id_tN14K_form__ktyp_t kvar_cases_0 = 0;
      fx_str_t kvar_cname_0 = {0};
      _fx_T2N14C_form__ctyp_tR10Ast__loc_t int_ctx_0 = {0};
      _fx_T2N14C_form__ctyp_tR10Ast__loc_t void_ctx_0 = {0};
      _fx_N14C_form__cexp_t dst_exp_1 = 0;
      _fx_T2N14C_form__ctyp_tR10Ast__loc_t v_239 = {0};
      _fx_N14C_form__cexp_t src_tag_exp_0 = 0;
      _fx_N14C_form__cexp_t dst_tag_exp_0 = 0;
      _fx_T2N14C_form__ctyp_tR10Ast__loc_t v_240 = {0};
      _fx_N14C_form__cexp_t src_u_exp_0 = 0;
      _fx_T2N14C_form__ctyp_tR10Ast__loc_t v_241 = {0};
      _fx_N14C_form__cexp_t dst_u_exp_0 = 0;
      _fx_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t
         __fold_result___2 = {0};
      _fx_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t
         v_242 = {0};
      _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t free_cases_0 = 0;
      _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t copy_cases_0 = 0;
      _fx_LT2R9Ast__id_tN14C_form__ctyp_t uelems_0 = 0;
      _fx_LN15C_form__cstmt_t free_code_8 = 0;
      _fx_LN15C_form__cstmt_t free_code_9 = 0;
      _fx_N14C_form__cexp_t v_243 = 0;
      _fx_N14C_form__cexp_t clear_tag_0 = 0;
      _fx_N15C_form__cstmt_t v_244 = 0;
      _fx_LN15C_form__cstmt_t copy_code_6 = 0;
      _fx_LN15C_form__cstmt_t copy_code_7 = 0;
      _fx_N14C_form__cexp_t v_245 = 0;
      _fx_N15C_form__cstmt_t default_copy_code_0 = 0;
      _fx_N14C_form__cexp_t v_246 = 0;
      _fx_N15C_form__cstmt_t v_247 = 0;
      _fx_LN15C_form__cstmt_t default_copy_code_1 = 0;
      _fx_LT2R9Ast__id_tN14C_form__ctyp_t relems_8 = 0;
      _fx_LT2R9Ast__id_tN14C_form__ctyp_t v_248 = 0;
      _fx_N14C_form__ctyp_t v_249 = 0;
      _fx_T2R9Ast__id_tN14C_form__ctyp_t v_250 = {0};
      _fx_LT2R9Ast__id_tN14C_form__ctyp_t relems_9 = 0;
      _fx_T2R9Ast__id_tN14C_form__ctyp_t v_251 = {0};
      _fx_LT2R9Ast__id_tN14C_form__ctyp_t relems_10 = 0;
      _fx_T2R9Ast__id_tN14C_form__ctyp_t v_252 = {0};
      _fx_T2R9Ast__id_tN14C_form__ctyp_t v_253 = {0};
      _fx_LT2R9Ast__id_tN14C_form__ctyp_t relems_11 = 0;
      _fx_N14C_form__ctyp_t v_254 = 0;
      _fx_N14C_form__ctyp_t v_255 = 0;
      _fx_R17C_form__cdeftyp_t v_256 = {0};
      _fx_N14C_form__ctyp_t v_257 = 0;
      _fx_R17C_form__cdeftyp_t v_258 = {0};
      _fx_LR9Ast__id_t ct_ifaces_0 = 0;
      _fx_R17C_form__cdeftyp_t v_259 = {0};
      _fx_LN15C_form__cstmt_t v_260 = 0;
      _fx_R17C_form__cdeffun_t v_261 = {0};
      _fx_LN15C_form__cstmt_t v_262 = 0;
      _fx_R17C_form__cdeffun_t v_263 = {0};
      _fx_R21K_form__kdefvariant_t* v_264 = &kt_info_0.u.KVariant->data;
      _fx_R10Ast__loc_t kvar_loc_0 = v_264->kvar_loc;
      _fx_R16Ast__var_flags_t kvar_flags_1 = v_264->kvar_flags;
      FX_COPY_PTR(v_264->kvar_ifaces, &kvar_ifaces_0);
      FX_COPY_PTR(v_264->kvar_cases, &kvar_cases_0);
      fx_copy_str(&v_264->kvar_cname, &kvar_cname_0);
      bool have_tag_0 = kvar_flags_1.var_flag_have_tag;
      _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(_fx_g21C_gen_types__CTypCInt, &kvar_loc_0, &int_ctx_0);
      _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(_fx_g21C_gen_types__CTypVoid, &kvar_loc_0, &void_ctx_0);
      _fx_R9Ast__id_t tag_id_0;
      fx_str_t slit_31 = FX_MAKE_STR("tag");
      FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&slit_31, &tag_id_0, 0), _fx_catch_29);
      _fx_R9Ast__id_t u_id_0;
      fx_str_t slit_32 = FX_MAKE_STR("u");
      FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&slit_32, &u_id_0, 0), _fx_catch_29);
      if (recursive_variant_0) {
         _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(struct_typ_0, &kvar_loc_0, &v_239);
         FX_CALL(
            _fx_M6C_formFM9CExpUnaryN14C_form__cexp_t3N16C_form__cunary_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
               &_fx_g21C_gen_types__COpDeref, dst_exp_0, &v_239, &dst_exp_1), _fx_catch_29);
      }
      else {
         FX_COPY_PTR(dst_exp_0, &dst_exp_1);
      }
      FX_CALL(
         _fx_M6C_formFM9CExpArrowN14C_form__cexp_t3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(src_exp_0,
            &tag_id_0, &int_ctx_0, &src_tag_exp_0), _fx_catch_29);
      FX_CALL(
         _fx_M6C_formFM9CExpArrowN14C_form__cexp_t3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(dst_exp_1,
            &tag_id_0, &int_ctx_0, &dst_tag_exp_0), _fx_catch_29);
      _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(_fx_g20C_gen_types__CTypAny, &kvar_loc_0, &v_240);
      FX_CALL(
         _fx_M6C_formFM9CExpArrowN14C_form__cexp_t3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(src_exp_0,
            &u_id_0, &v_240, &src_u_exp_0), _fx_catch_29);
      _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(_fx_g20C_gen_types__CTypAny, &kvar_loc_0, &v_241);
      FX_CALL(
         _fx_M6C_formFM9CExpArrowN14C_form__cexp_t3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(dst_exp_1,
            &u_id_0, &v_241, &dst_u_exp_0), _fx_catch_29);
      _fx_make_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t(
         0, 0, 0, &__fold_result___2);
      int_ i_1 = 0;
      _fx_LT2R9Ast__id_tN14K_form__ktyp_t lst_2 = kvar_cases_0;
      for (; lst_2; lst_2 = lst_2->tl, i_1 += 1) {
         _fx_N14K_form__ktyp_t kt_0 = 0;
         _fx_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t
            v_265 = {0};
         _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t free_cases_1 = 0;
         _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t copy_cases_1 = 0;
         _fx_LT2R9Ast__id_tN14C_form__ctyp_t uelems_1 = 0;
         _fx_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t
            v_266 = {0};
         _fx_T2R9Ast__id_tN14K_form__ktyp_t* __pat___1 = &lst_2->hd;
         _fx_R9Ast__id_t ni_2 = __pat___1->t0;
         FX_COPY_PTR(__pat___1->t1, &kt_0);
         _fx_copy_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t(
            &__fold_result___2, &v_265);
         FX_COPY_PTR(v_265.t0, &free_cases_1);
         FX_COPY_PTR(v_265.t1, &copy_cases_1);
         FX_COPY_PTR(v_265.t2, &uelems_1);
         int_ label_i_0 = i_1 + 1;
         if (FX_REC_VARIANT_TAG(kt_0) == 7) {
            _fx_make_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t(
               free_cases_1, copy_cases_1, uelems_1, &v_266);
         }
         else {
            _fx_N14C_form__ctyp_t ti_0 = 0;
            _fx_T2N14C_form__ctyp_tR10Ast__loc_t v_267 = {0};
            _fx_N14C_form__cexp_t selem_i_0 = 0;
            _fx_T2N14C_form__ctyp_tR10Ast__loc_t v_268 = {0};
            _fx_N14C_form__cexp_t delem_i_0 = 0;
            _fx_N14C_form__cexp_t v_269 = 0;
            _fx_LN14C_form__cexp_t switch_label_i_exps_0 = 0;
            _fx_LN15C_form__cstmt_t free_code_i_0 = 0;
            _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t free_cases_2 = 0;
            _fx_LN15C_form__cstmt_t copy_code_i_0 = 0;
            _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t copy_cases_2 = 0;
            _fx_T2R9Ast__id_tN14C_form__ctyp_t v_270 = {0};
            _fx_LT2R9Ast__id_tN14C_form__ctyp_t v_271 = 0;
            FX_CALL(_fx_M11C_gen_typesFM9ktyp2ctypN14C_form__ctyp_t2N14K_form__ktyp_tR10Ast__loc_t(kt_0, loc_0, &ti_0, 0),
               _fx_catch_22);
            _fx_R9Ast__id_t ni_clean_0;
            FX_CALL(_fx_M3AstFM11get_orig_idRM4id_t1RM4id_t(&ni_2, &ni_clean_0, 0), _fx_catch_22);
            _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(ti_0, &kvar_loc_0, &v_267);
            FX_CALL(
               _fx_M6C_formFM7CExpMemN14C_form__cexp_t3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(src_u_exp_0,
                  &ni_clean_0, &v_267, &selem_i_0), _fx_catch_22);
            _fx_make_T2N14C_form__ctyp_tR10Ast__loc_t(ti_0, &kvar_loc_0, &v_268);
            FX_CALL(
               _fx_M6C_formFM7CExpMemN14C_form__cexp_t3N14C_form__cexp_tR9Ast__id_tT2N14C_form__ctyp_tR10Ast__loc_t(dst_u_exp_0,
                  &ni_clean_0, &v_268, &delem_i_0), _fx_catch_22);
            FX_CALL(_fx_M6C_formFM12make_int_expN14C_form__cexp_t2iR10Ast__loc_t(label_i_0, &kvar_loc_0, &v_269, 0),
               _fx_catch_22);
            FX_CALL(_fx_cons_LN14C_form__cexp_t(v_269, 0, true, &switch_label_i_exps_0), _fx_catch_22);
            FX_CALL(
               _fx_M11C_gen_typesFM13gen_free_codeLN15C_form__cstmt_t6N14C_form__cexp_tN14C_form__ctyp_tBBLN15C_form__cstmt_tR10Ast__loc_t(
                  delem_i_0, ti_0, false, false, 0, &kvar_loc_0, &free_code_i_0, 0), _fx_catch_22);
            if (free_code_i_0 == 0) {
               FX_COPY_PTR(free_cases_1, &free_cases_2);
            }
            else {
               _fx_T2LN14C_form__cexp_tLN15C_form__cstmt_t v_272 = {0};
               _fx_make_T2LN14C_form__cexp_tLN15C_form__cstmt_t(switch_label_i_exps_0, free_code_i_0, &v_272);
               FX_CALL(_fx_cons_LT2LN14C_form__cexp_tLN15C_form__cstmt_t(&v_272, free_cases_1, true, &free_cases_2),
                  _fx_catch_20);

            _fx_catch_20: ;
               _fx_free_T2LN14C_form__cexp_tLN15C_form__cstmt_t(&v_272);
            }
            FX_CHECK_EXN(_fx_catch_22);
            FX_CALL(
               _fx_M11C_gen_typesFM13gen_copy_codeLN15C_form__cstmt_t5N14C_form__cexp_tN14C_form__cexp_tN14C_form__ctyp_tLN15C_form__cstmt_tR10Ast__loc_t(
                  selem_i_0, delem_i_0, ti_0, 0, &kvar_loc_0, &copy_code_i_0, 0), _fx_catch_22);
            if (copy_code_i_0 != 0) {
               if (copy_code_i_0->tl == 0) {
                  _fx_N15C_form__cstmt_t v_273 = copy_code_i_0->hd;
                  if (FX_REC_VARIANT_TAG(v_273) == 3) {
                     _fx_N14C_form__cexp_t v_274 = v_273->u.CExp;
                     if (FX_REC_VARIANT_TAG(v_274) == 3) {
                        if (v_274->u.CExpBinary.t0.tag == 15) {
                           FX_COPY_PTR(copy_cases_1, &copy_cases_2); goto _fx_endmatch_2;
                        }
                     }
                  }
               }
            }
            _fx_T2LN14C_form__cexp_tLN15C_form__cstmt_t v_275 = {0};
            _fx_make_T2LN14C_form__cexp_tLN15C_form__cstmt_t(switch_label_i_exps_0, copy_code_i_0, &v_275);
            FX_CALL(_fx_cons_LT2LN14C_form__cexp_tLN15C_form__cstmt_t(&v_275, copy_cases_1, true, &copy_cases_2), _fx_catch_21);

         _fx_catch_21: ;
            _fx_free_T2LN14C_form__cexp_tLN15C_form__cstmt_t(&v_275);

         _fx_endmatch_2: ;
            FX_CHECK_EXN(_fx_catch_22);
            _fx_make_T2R9Ast__id_tN14C_form__ctyp_t(&ni_clean_0, ti_0, &v_270);
            FX_CALL(_fx_cons_LT2R9Ast__id_tN14C_form__ctyp_t(&v_270, uelems_1, true, &v_271), _fx_catch_22);
            _fx_make_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t(
               free_cases_2, copy_cases_2, v_271, &v_266);

         _fx_catch_22: ;
            if (v_271) {
               _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&v_271);
            }
            _fx_free_T2R9Ast__id_tN14C_form__ctyp_t(&v_270);
            if (copy_cases_2) {
               _fx_free_LT2LN14C_form__cexp_tLN15C_form__cstmt_t(&copy_cases_2);
            }
            if (copy_code_i_0) {
               _fx_free_LN15C_form__cstmt_t(&copy_code_i_0);
            }
            if (free_cases_2) {
               _fx_free_LT2LN14C_form__cexp_tLN15C_form__cstmt_t(&free_cases_2);
            }
            if (free_code_i_0) {
               _fx_free_LN15C_form__cstmt_t(&free_code_i_0);
            }
            if (switch_label_i_exps_0) {
               _fx_free_LN14C_form__cexp_t(&switch_label_i_exps_0);
            }
            if (v_269) {
               _fx_free_N14C_form__cexp_t(&v_269);
            }
            if (delem_i_0) {
               _fx_free_N14C_form__cexp_t(&delem_i_0);
            }
            _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&v_268);
            if (selem_i_0) {
               _fx_free_N14C_form__cexp_t(&selem_i_0);
            }
            _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&v_267);
            if (ti_0) {
               _fx_free_N14C_form__ctyp_t(&ti_0);
            }
         }
         FX_CHECK_EXN(_fx_catch_23);
         _fx_free_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t(
            &__fold_result___2);
         _fx_copy_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t(
            &v_266, &__fold_result___2);

      _fx_catch_23: ;
         _fx_free_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t(
            &v_266);
         if (uelems_1) {
            _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&uelems_1);
         }
         if (copy_cases_1) {
            _fx_free_LT2LN14C_form__cexp_tLN15C_form__cstmt_t(&copy_cases_1);
         }
         if (free_cases_1) {
            _fx_free_LT2LN14C_form__cexp_tLN15C_form__cstmt_t(&free_cases_1);
         }
         _fx_free_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t(
            &v_265);
         if (kt_0) {
            _fx_free_N14K_form__ktyp_t(&kt_0);
         }
         FX_CHECK_EXN(_fx_catch_29);
      }
      _fx_copy_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t(
         &__fold_result___2, &v_242);
      FX_COPY_PTR(v_242.t0, &free_cases_0);
      FX_COPY_PTR(v_242.t1, &copy_cases_0);
      FX_COPY_PTR(v_242.t2, &uelems_0);
      if (free_cases_0 == 0) {
         goto _fx_endmatch_3;
      }
      if (have_tag_0 == false) {
         if (free_cases_0 != 0) {
            fx_str_t v_276 = {0};
            fx_str_t v_277 = {0};
            fx_exn_t v_278 = {0};
            if (free_cases_0->tl != 0) {
               FX_CALL(_fx_M11C_gen_typesFM6stringS1S(&kvar_cname_0, &v_276, 0), _fx_catch_24);
               fx_str_t slit_33 = FX_MAKE_STR("cgen: variant \'");
               fx_str_t slit_34 = FX_MAKE_STR("\' with no tag somehow has multiple cases in the destructor");
               {
                  const fx_str_t strs_12[] = { slit_33, v_276, slit_34 };
                  FX_CALL(fx_strjoin(0, 0, 0, strs_12, 3, &v_277), _fx_catch_24);
               }
               FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(&kvar_loc_0, &v_277, &v_278, 0), _fx_catch_24);
               FX_THROW(&v_278, false, _fx_catch_24);
            }
            FX_COPY_PTR(free_cases_0->hd.t1, &free_code_8);

         _fx_catch_24: ;
            fx_free_exn(&v_278);
            FX_FREE_STR(&v_277);
            FX_FREE_STR(&v_276);
            goto _fx_endmatch_3;
         }
      }
      _fx_T2LN14C_form__cexp_tLN15C_form__cstmt_t v_279 = {0};
      _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t free_cases_3 = 0;
      _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t v_280 = 0;
      _fx_N15C_form__cstmt_t v_281 = 0;
      _fx_make_T2LN14C_form__cexp_tLN15C_form__cstmt_t(0, 0, &v_279);
      FX_CALL(_fx_cons_LT2LN14C_form__cexp_tLN15C_form__cstmt_t(&v_279, free_cases_0, true, &free_cases_3), _fx_catch_25);
      FX_CALL(
         _fx_M11C_gen_typesFM3revLT2LN14C_form__cexp_tLN15C_form__cstmt_t1LT2LN14C_form__cexp_tLN15C_form__cstmt_t(free_cases_3,
            &v_280, 0), _fx_catch_25);
      FX_CALL(
         _fx_M6C_formFM11CStmtSwitchN15C_form__cstmt_t3N14C_form__cexp_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tR10Ast__loc_t(
            dst_tag_exp_0, v_280, &kvar_loc_0, &v_281), _fx_catch_25);
      FX_CALL(_fx_cons_LN15C_form__cstmt_t(v_281, 0, true, &free_code_8), _fx_catch_25);

   _fx_catch_25: ;
      if (v_281) {
         _fx_free_N15C_form__cstmt_t(&v_281);
      }
      if (v_280) {
         _fx_free_LT2LN14C_form__cexp_tLN15C_form__cstmt_t(&v_280);
      }
      if (free_cases_3) {
         _fx_free_LT2LN14C_form__cexp_tLN15C_form__cstmt_t(&free_cases_3);
      }
      _fx_free_T2LN14C_form__cexp_tLN15C_form__cstmt_t(&v_279);

   _fx_endmatch_3: ;
      FX_CHECK_EXN(_fx_catch_29);
      if (recursive_variant_0) {
         FX_CALL(
            _fx_M11C_gen_typesFM15decref_and_freeLN15C_form__cstmt_t3N14C_form__cexp_tLN15C_form__cstmt_tR10Ast__loc_t(
               dst_exp_1, free_code_8, &kvar_loc_0, &free_code_9, 0), _fx_catch_29);
      }
      else if (have_tag_0) {
         FX_CALL(_fx_M6C_formFM12make_int_expN14C_form__cexp_t2iR10Ast__loc_t(0, &kvar_loc_0, &v_243, 0), _fx_catch_29);
         FX_CALL(
            _fx_M6C_formFM10CExpBinaryN14C_form__cexp_t4N17C_form__cbinary_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
               &_fx_g22C_gen_types__COpAssign, dst_tag_exp_0, v_243, &void_ctx_0, &clear_tag_0), _fx_catch_29);
         if (free_code_8 != 0) {
            FX_CALL(_fx_M6C_formFM4CExpN15C_form__cstmt_t1N14C_form__cexp_t(clear_tag_0, &v_244), _fx_catch_29);
            FX_CALL(_fx_cons_LN15C_form__cstmt_t(v_244, free_code_8, true, &free_code_9), _fx_catch_29);
         }
      }
      else {
         FX_COPY_PTR(free_code_8, &free_code_9);
      }
      if (have_tag_0) {
         FX_CALL(
            _fx_M11C_gen_typesFM13gen_copy_codeLN15C_form__cstmt_t5N14C_form__cexp_tN14C_form__cexp_tN14C_form__ctyp_tLN15C_form__cstmt_tR10Ast__loc_t(
               src_tag_exp_0, dst_tag_exp_0, _fx_g21C_gen_types__CTypCInt, 0, &kvar_loc_0, &copy_code_7, 0), _fx_catch_29);
         FX_CALL(
            _fx_M6C_formFM10CExpBinaryN14C_form__cexp_t4N17C_form__cbinary_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
               &_fx_g22C_gen_types__COpAssign, dst_u_exp_0, src_u_exp_0, &void_ctx_0, &v_245), _fx_catch_29);
         FX_CALL(_fx_M6C_formFM4CExpN15C_form__cstmt_t1N14C_form__cexp_t(v_245, &default_copy_code_0), _fx_catch_29);
         if (copy_cases_0 == 0) {
            FX_CALL(_fx_cons_LN15C_form__cstmt_t(default_copy_code_0, copy_code_7, true, &copy_code_6), _fx_catch_26);

         _fx_catch_26: ;
         }
         else {
            _fx_LN15C_form__cstmt_t v_282 = 0;
            _fx_T2LN14C_form__cexp_tLN15C_form__cstmt_t v_283 = {0};
            _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t copy_cases_3 = 0;
            _fx_LT2LN14C_form__cexp_tLN15C_form__cstmt_t v_284 = 0;
            _fx_N15C_form__cstmt_t v_285 = 0;
            FX_CALL(_fx_cons_LN15C_form__cstmt_t(default_copy_code_0, 0, true, &v_282), _fx_catch_27);
            _fx_make_T2LN14C_form__cexp_tLN15C_form__cstmt_t(0, v_282, &v_283);
            FX_CALL(_fx_cons_LT2LN14C_form__cexp_tLN15C_form__cstmt_t(&v_283, copy_cases_0, true, &copy_cases_3), _fx_catch_27);
            FX_CALL(
               _fx_M11C_gen_typesFM3revLT2LN14C_form__cexp_tLN15C_form__cstmt_t1LT2LN14C_form__cexp_tLN15C_form__cstmt_t(
                  copy_cases_3, &v_284, 0), _fx_catch_27);
            FX_CALL(
               _fx_M6C_formFM11CStmtSwitchN15C_form__cstmt_t3N14C_form__cexp_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tR10Ast__loc_t(
                  src_tag_exp_0, v_284, &kvar_loc_0, &v_285), _fx_catch_27);
            FX_CALL(_fx_cons_LN15C_form__cstmt_t(v_285, copy_code_7, true, &copy_code_6), _fx_catch_27);

         _fx_catch_27: ;
            if (v_285) {
               _fx_free_N15C_form__cstmt_t(&v_285);
            }
            if (v_284) {
               _fx_free_LT2LN14C_form__cexp_tLN15C_form__cstmt_t(&v_284);
            }
            if (copy_cases_3) {
               _fx_free_LT2LN14C_form__cexp_tLN15C_form__cstmt_t(&copy_cases_3);
            }
            _fx_free_T2LN14C_form__cexp_tLN15C_form__cstmt_t(&v_283);
            if (v_282) {
               _fx_free_LN15C_form__cstmt_t(&v_282);
            }
         }
         FX_CHECK_EXN(_fx_catch_29);
      }
      else {
         FX_CALL(
            _fx_M6C_formFM10CExpBinaryN14C_form__cexp_t4N17C_form__cbinary_tN14C_form__cexp_tN14C_form__cexp_tT2N14C_form__ctyp_tR10Ast__loc_t(
               &_fx_g22C_gen_types__COpAssign, dst_u_exp_0, src_u_exp_0, &void_ctx_0, &v_246), _fx_catch_29);
         FX_CALL(_fx_M6C_formFM4CExpN15C_form__cstmt_t1N14C_form__cexp_t(v_246, &v_247), _fx_catch_29);
         FX_CALL(_fx_cons_LN15C_form__cstmt_t(v_247, 0, true, &default_copy_code_1), _fx_catch_29);
         if (copy_cases_0 != 0) {
            if (copy_cases_0->tl == 0) {
               FX_COPY_PTR(copy_cases_0->hd.t1, &copy_code_6); goto _fx_endmatch_4;
            }
         }
         FX_COPY_PTR(default_copy_code_1, &copy_code_6);

      _fx_endmatch_4: ;
         FX_CHECK_EXN(_fx_catch_29);
      }
      if (uelems_0 != 0) {
         FX_CALL(_fx_M11C_gen_typesFM3revLT2R9Ast__id_tN14C_form__ctyp_t1LT2R9Ast__id_tN14C_form__ctyp_t(uelems_0, &v_248, 0),
            _fx_catch_29);
         FX_CALL(
            _fx_M6C_formFM9CTypUnionN14C_form__ctyp_t2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t(
               &_fx_g19C_gen_types__None5_, v_248, &v_249), _fx_catch_29);
         _fx_make_T2R9Ast__id_tN14C_form__ctyp_t(&u_id_0, v_249, &v_250);
         FX_CALL(_fx_cons_LT2R9Ast__id_tN14C_form__ctyp_t(&v_250, 0, true, &relems_8), _fx_catch_29);
      }
      if (have_tag_0) {
         _fx_make_T2R9Ast__id_tN14C_form__ctyp_t(&tag_id_0, _fx_g21C_gen_types__CTypCInt, &v_251);
         FX_CALL(_fx_cons_LT2R9Ast__id_tN14C_form__ctyp_t(&v_251, relems_8, true, &relems_9), _fx_catch_29);
      }
      else {
         FX_COPY_PTR(relems_8, &relems_9);
      }
      if (recursive_variant_0) {
         if (kvar_ifaces_0 == 0) {
            FX_COPY_PTR(relems_9, &relems_10);
         }
         else {
            _fx_R9Ast__id_t v_286;
            fx_str_t slit_35 = FX_MAKE_STR("ifaces");
            FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&slit_35, &v_286, 0), _fx_catch_29);
            _fx_make_T2R9Ast__id_tN14C_form__ctyp_t(&v_286, _fx_g28C_form__std_fx_ifaces_t_cptr, &v_252);
            FX_CALL(_fx_cons_LT2R9Ast__id_tN14C_form__ctyp_t(&v_252, relems_9, true, &relems_10), _fx_catch_29);
         }
         _fx_R9Ast__id_t v_287;
         fx_str_t slit_36 = FX_MAKE_STR("rc");
         FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&slit_36, &v_287, 0), _fx_catch_29);
         _fx_make_T2R9Ast__id_tN14C_form__ctyp_t(&v_287, _fx_g20C_gen_types__CTypInt, &v_253);
         FX_CALL(_fx_cons_LT2R9Ast__id_tN14C_form__ctyp_t(&v_253, relems_10, true, &relems_11), _fx_catch_29);
         _fx_R17C_form__cdeftyp_t* v_288 = &struct_decl_0->data;
         FX_CALL(
            _fx_M6C_formFM10CTypStructN14C_form__ctyp_t2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t(&struct_id_opt_1,
               relems_11, &v_254), _fx_catch_29);
         FX_CALL(_fx_M6C_formFM8make_ptrN14C_form__ctyp_t1N14C_form__ctyp_t(v_254, &v_255, 0), _fx_catch_29);
         _fx_make_R17C_form__cdeftyp_t(&v_288->ct_name, v_255, &v_288->ct_cname, &v_288->ct_props, v_288->ct_data_start,
            &v_288->ct_enum, v_288->ct_ifaces, &v_288->ct_ifaces_id, v_288->ct_scope, &v_288->ct_loc, &v_256);
         _fx_R17C_form__cdeftyp_t* v_289 = &struct_decl_0->data;
         _fx_free_R17C_form__cdeftyp_t(v_289);
         _fx_copy_R17C_form__cdeftyp_t(&v_256, v_289);
      }
      else {
         _fx_R17C_form__cdeftyp_t* v_290 = &struct_decl_0->data;
         FX_CALL(
            _fx_M6C_formFM10CTypStructN14C_form__ctyp_t2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t(&struct_id_opt_1,
               relems_9, &v_257), _fx_catch_29);
         _fx_make_R17C_form__cdeftyp_t(&v_290->ct_name, v_257, &v_290->ct_cname, &v_290->ct_props, v_290->ct_data_start,
            &v_290->ct_enum, v_290->ct_ifaces, &v_290->ct_ifaces_id, v_290->ct_scope, &v_290->ct_loc, &v_258);
         _fx_R17C_form__cdeftyp_t* v_291 = &struct_decl_0->data;
         _fx_free_R17C_form__cdeftyp_t(v_291);
         _fx_copy_R17C_form__cdeftyp_t(&v_258, v_291);
      }
      _fx_LR9Ast__id_t lstend_0 = 0;
      _fx_LT2R9Ast__id_tLR9Ast__id_t lst_3 = kvar_ifaces_0;
      for (; lst_3; lst_3 = lst_3->tl) {
         _fx_T2R9Ast__id_tLR9Ast__id_t* __pat___2 = &lst_3->hd;
         _fx_LR9Ast__id_t node_0 = 0;
         FX_CALL(_fx_cons_LR9Ast__id_t(&__pat___2->t0, 0, false, &node_0), _fx_catch_28);
         FX_LIST_APPEND(ct_ifaces_0, lstend_0, node_0);

      _fx_catch_28: ;
         FX_CHECK_EXN(_fx_catch_29);
      }
      _fx_R17C_form__cdeftyp_t* v_292 = &struct_decl_0->data;
      _fx_make_R17C_form__cdeftyp_t(&v_292->ct_name, v_292->ct_typ, &v_292->ct_cname, &v_292->ct_props, v_292->ct_data_start,
         &_fx_g9Ast__noid, ct_ifaces_0, &v_292->ct_ifaces_id, v_292->ct_scope, &v_292->ct_loc, &v_259);
      _fx_R17C_form__cdeftyp_t* v_293 = &struct_decl_0->data;
      _fx_free_R17C_form__cdeftyp_t(v_293);
      _fx_copy_R17C_form__cdeftyp_t(&v_259, v_293);
      _fx_R17C_form__cdeffun_t* v_294 = &freef_decl_0->data;
      FX_CALL(_fx_M11C_gen_typesFM3revLN15C_form__cstmt_t1LN15C_form__cstmt_t(free_code_9, &v_260, 0), _fx_catch_29);
      _fx_make_R17C_form__cdeffun_t(&v_294->cf_name, &v_294->cf_cname, v_294->cf_args, v_294->cf_rt, v_260, &v_294->cf_flags,
         v_294->cf_scope, &v_294->cf_loc, &v_261);
      _fx_R17C_form__cdeffun_t* v_295 = &freef_decl_0->data;
      _fx_free_R17C_form__cdeffun_t(v_295);
      _fx_copy_R17C_form__cdeffun_t(&v_261, v_295);
      _fx_R17C_form__cdeffun_t* v_296 = &copyf_decl_0->data;
      FX_CALL(_fx_M11C_gen_typesFM3revLN15C_form__cstmt_t1LN15C_form__cstmt_t(copy_code_6, &v_262, 0), _fx_catch_29);
      _fx_make_R17C_form__cdeffun_t(&v_296->cf_name, &v_296->cf_cname, v_296->cf_args, v_296->cf_rt, v_262, &v_296->cf_flags,
         v_296->cf_scope, &v_296->cf_loc, &v_263);
      _fx_R17C_form__cdeffun_t* v_297 = &copyf_decl_0->data;
      _fx_free_R17C_form__cdeffun_t(v_297);
      _fx_copy_R17C_form__cdeffun_t(&v_263, v_297);

   _fx_catch_29: ;
      _fx_free_R17C_form__cdeffun_t(&v_263);
      if (v_262) {
         _fx_free_LN15C_form__cstmt_t(&v_262);
      }
      _fx_free_R17C_form__cdeffun_t(&v_261);
      if (v_260) {
         _fx_free_LN15C_form__cstmt_t(&v_260);
      }
      _fx_free_R17C_form__cdeftyp_t(&v_259);
      FX_FREE_LIST_SIMPLE(&ct_ifaces_0);
      _fx_free_R17C_form__cdeftyp_t(&v_258);
      if (v_257) {
         _fx_free_N14C_form__ctyp_t(&v_257);
      }
      _fx_free_R17C_form__cdeftyp_t(&v_256);
      if (v_255) {
         _fx_free_N14C_form__ctyp_t(&v_255);
      }
      if (v_254) {
         _fx_free_N14C_form__ctyp_t(&v_254);
      }
      if (relems_11) {
         _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&relems_11);
      }
      _fx_free_T2R9Ast__id_tN14C_form__ctyp_t(&v_253);
      _fx_free_T2R9Ast__id_tN14C_form__ctyp_t(&v_252);
      if (relems_10) {
         _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&relems_10);
      }
      _fx_free_T2R9Ast__id_tN14C_form__ctyp_t(&v_251);
      if (relems_9) {
         _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&relems_9);
      }
      _fx_free_T2R9Ast__id_tN14C_form__ctyp_t(&v_250);
      if (v_249) {
         _fx_free_N14C_form__ctyp_t(&v_249);
      }
      if (v_248) {
         _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&v_248);
      }
      if (relems_8) {
         _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&relems_8);
      }
      if (default_copy_code_1) {
         _fx_free_LN15C_form__cstmt_t(&default_copy_code_1);
      }
      if (v_247) {
         _fx_free_N15C_form__cstmt_t(&v_247);
      }
      if (v_246) {
         _fx_free_N14C_form__cexp_t(&v_246);
      }
      if (default_copy_code_0) {
         _fx_free_N15C_form__cstmt_t(&default_copy_code_0);
      }
      if (v_245) {
         _fx_free_N14C_form__cexp_t(&v_245);
      }
      if (copy_code_7) {
         _fx_free_LN15C_form__cstmt_t(&copy_code_7);
      }
      if (copy_code_6) {
         _fx_free_LN15C_form__cstmt_t(&copy_code_6);
      }
      if (v_244) {
         _fx_free_N15C_form__cstmt_t(&v_244);
      }
      if (clear_tag_0) {
         _fx_free_N14C_form__cexp_t(&clear_tag_0);
      }
      if (v_243) {
         _fx_free_N14C_form__cexp_t(&v_243);
      }
      if (free_code_9) {
         _fx_free_LN15C_form__cstmt_t(&free_code_9);
      }
      if (free_code_8) {
         _fx_free_LN15C_form__cstmt_t(&free_code_8);
      }
      if (uelems_0) {
         _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&uelems_0);
      }
      if (copy_cases_0) {
         _fx_free_LT2LN14C_form__cexp_tLN15C_form__cstmt_t(&copy_cases_0);
      }
      if (free_cases_0) {
         _fx_free_LT2LN14C_form__cexp_tLN15C_form__cstmt_t(&free_cases_0);
      }
      _fx_free_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t(
         &v_242);
      _fx_free_T3LT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2LN14C_form__cexp_tLN15C_form__cstmt_tLT2R9Ast__id_tN14C_form__ctyp_t(
         &__fold_result___2);
      if (dst_u_exp_0) {
         _fx_free_N14C_form__cexp_t(&dst_u_exp_0);
      }
      _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&v_241);
      if (src_u_exp_0) {
         _fx_free_N14C_form__cexp_t(&src_u_exp_0);
      }
      _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&v_240);
      if (dst_tag_exp_0) {
         _fx_free_N14C_form__cexp_t(&dst_tag_exp_0);
      }
      if (src_tag_exp_0) {
         _fx_free_N14C_form__cexp_t(&src_tag_exp_0);
      }
      _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&v_239);
      if (dst_exp_1) {
         _fx_free_N14C_form__cexp_t(&dst_exp_1);
      }
      _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&void_ctx_0);
      _fx_free_T2N14C_form__ctyp_tR10Ast__loc_t(&int_ctx_0);
      FX_FREE_STR(&kvar_cname_0);
      if (kvar_cases_0) {
         _fx_free_LT2R9Ast__id_tN14K_form__ktyp_t(&kvar_cases_0);
      }
      if (kvar_ifaces_0) {
         _fx_free_LT2R9Ast__id_tLR9Ast__id_t(&kvar_ifaces_0);
      }
   }
   else if (tag_0 == 7) {
      _fx_LN12Ast__scope_t ki_scope_0 = 0;
      _fx_LT2R9Ast__id_tN14K_form__ktyp_t ki_all_methods_0 = 0;
      fx_str_t ki_cname_0 = {0};
      fx_str_t v_298 = {0};
      fx_str_t v_299 = {0};
      fx_str_t v_300 = {0};
      fx_str_t vtbl_cname_0 = {0};
      _fx_R23C_form__cdefinterface_t v_301 = {0};
      _fx_rR23C_form__cdefinterface_t iface_decl_0 = 0;
      _fx_N15C_form__cinfo_t v_302 = {0};
      _fx_LT2R9Ast__id_tN14C_form__ctyp_t vtbl_elems_0 = 0;
      _fx_R17C_form__ctprops_t ctp_0 = {0};
      _fx_N14C_form__ctyp_t v_303 = 0;
      _fx_N14C_form__ctyp_t v_304 = 0;
      _fx_T2R9Ast__id_tN14C_form__ctyp_t v_305 = {0};
      _fx_T2R9Ast__id_tN14C_form__ctyp_t v_306 = {0};
      _fx_LT2R9Ast__id_tN14C_form__ctyp_t v_307 = 0;
      _fx_LT2R9Ast__id_tN14C_form__ctyp_t relems_12 = 0;
      _fx_N15C_form__cstmt_t v_308 = 0;
      _fx_N14C_form__ctyp_t v_309 = 0;
      _fx_R17C_form__ctprops_t v_310 = {0};
      _fx_R17C_form__cdeftyp_t v_311 = {0};
      _fx_rR17C_form__cdeftyp_t vtbl_decl_0 = 0;
      _fx_N15C_form__cinfo_t v_312 = {0};
      _fx_N15C_form__cstmt_t v_313 = 0;
      _fx_N15C_form__cstmt_t v_314 = 0;
      _fx_LN15C_form__cstmt_t v_315 = 0;
      _fx_N14C_form__ctyp_t v_316 = 0;
      _fx_R17C_form__cdeftyp_t v_317 = {0};
      _fx_R23C_form__cdefinterface_t v_318 = {0};
      _fx_R23K_form__kdefinterface_t* v_319 = &kt_info_0.u.KInterface->data;
      _fx_R10Ast__loc_t ki_loc_0 = v_319->ki_loc;
      FX_COPY_PTR(v_319->ki_scope, &ki_scope_0);
      FX_COPY_PTR(v_319->ki_all_methods, &ki_all_methods_0);
      _fx_R9Ast__id_t ki_id_0 = v_319->ki_id;
      _fx_R9Ast__id_t ki_base_0 = v_319->ki_base;
      fx_copy_str(&v_319->ki_cname, &ki_cname_0);
      _fx_R9Ast__id_t ki_name_0 = v_319->ki_name;
      FX_CALL(_fx_M3AstFM2ppS1RM4id_t(&ki_name_0, &v_298, 0), _fx_catch_32);
      fx_str_t slit_37 = FX_MAKE_STR("_vtbl_t");
      {
         const fx_str_t strs_13[] = { v_298, slit_37 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_13, 2, &v_299), _fx_catch_32);
      }
      _fx_R9Ast__id_t vtbl_id_0;
      FX_CALL(_fx_M6C_formFM7gen_idcR9Ast__id_t2iS(*curr_cm_idx_0, &v_299, &vtbl_id_0, 0), _fx_catch_32);
      FX_CALL(_fx_M8K_mangleFM9remove_fxS1S(&ki_cname_0, &v_300, 0), _fx_catch_32);
      fx_str_t slit_38 = FX_MAKE_STR("_vtbl_t");
      {
         const fx_str_t strs_14[] = { v_300, slit_38 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_14, 2, &vtbl_cname_0), _fx_catch_32);
      }
      _fx_make_R23C_form__cdefinterface_t(&ki_name_0, &ki_cname_0, &ki_id_0, &vtbl_id_0, &ki_base_0, 0, ki_scope_0, &ki_loc_0,
         &v_301);
      FX_CALL(_fx_make_rR23C_form__cdefinterface_t(&v_301, &iface_decl_0), _fx_catch_32);
      _fx_M6C_formFM10CInterfaceN15C_form__cinfo_t1rRM15cdefinterface_t(iface_decl_0, &v_302);
      FX_CALL(_fx_M6C_formFM13set_idc_entryv2R9Ast__id_tN15C_form__cinfo_t(&ki_name_0, &v_302, 0), _fx_catch_32);
      _fx_LT2R9Ast__id_tN14C_form__ctyp_t lstend_1 = 0;
      _fx_LT2R9Ast__id_tN14K_form__ktyp_t lst_4 = ki_all_methods_0;
      for (; lst_4; lst_4 = lst_4->tl) {
         _fx_N14K_form__ktyp_t t_0 = 0;
         _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t v_320 = {0};
         _fx_LN14K_form__ktyp_t args_0 = 0;
         _fx_N14K_form__ktyp_t rt_0 = 0;
         _fx_LN14C_form__ctyp_t v_321 = 0;
         _fx_LN14C_form__ctyp_t cargs_1 = 0;
         _fx_N14C_form__ctyp_t ctyp_1 = 0;
         _fx_T2R9Ast__id_tN14C_form__ctyp_t tup_4 = {0};
         _fx_T2R9Ast__id_tN14K_form__ktyp_t* __pat___3 = &lst_4->hd;
         _fx_R9Ast__id_t f_2 = __pat___3->t0;
         FX_COPY_PTR(__pat___3->t1, &t_0);
         _fx_R9Ast__id_t f_3;
         FX_CALL(_fx_M3AstFM11get_orig_idRM4id_t1RM4id_t(&f_2, &f_3, 0), _fx_catch_31);
         if (FX_REC_VARIANT_TAG(t_0) == 13) {
            _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t* vcase_1 = &t_0->u.KTypFun;
            _fx_make_T2LN14K_form__ktyp_tN14K_form__ktyp_t(vcase_1->t0, vcase_1->t1, &v_320);
         }
         else {
            fx_str_t v_322 = {0};
            fx_str_t v_323 = {0};
            fx_str_t v_324 = {0};
            fx_str_t v_325 = {0};
            fx_str_t v_326 = {0};
            fx_str_t v_327 = {0};
            fx_exn_t v_328 = {0};
            FX_CALL(_fx_M3AstFM2ppS1RM4id_t(&ki_name_0, &v_322, 0), _fx_catch_30);
            FX_CALL(_fx_M11C_gen_typesFM6stringS1S(&v_322, &v_323, 0), _fx_catch_30);
            FX_CALL(_fx_M3AstFM2ppS1RM4id_t(&f_3, &v_324, 0), _fx_catch_30);
            FX_CALL(_fx_M11C_gen_typesFM6stringS1S(&v_324, &v_325, 0), _fx_catch_30);
            FX_CALL(_fx_M6K_formFM6stringS1N14K_form__ktyp_t(t_0, &v_326, 0), _fx_catch_30);
            fx_str_t slit_39 = FX_MAKE_STR("cgen: method ");
            fx_str_t slit_40 = FX_MAKE_STR(".");
            fx_str_t slit_41 = FX_MAKE_STR(" has non-function type ");
            {
               const fx_str_t strs_15[] = { slit_39, v_323, slit_40, v_325, slit_41, v_326 };
               FX_CALL(fx_strjoin(0, 0, 0, strs_15, 6, &v_327), _fx_catch_30);
            }
            FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(&ki_loc_0, &v_327, &v_328, 0), _fx_catch_30);
            FX_THROW(&v_328, false, _fx_catch_30);

         _fx_catch_30: ;
            fx_free_exn(&v_328);
            FX_FREE_STR(&v_327);
            FX_FREE_STR(&v_326);
            FX_FREE_STR(&v_325);
            FX_FREE_STR(&v_324);
            FX_FREE_STR(&v_323);
            FX_FREE_STR(&v_322);
         }
         FX_CHECK_EXN(_fx_catch_31);
         FX_COPY_PTR(v_320.t0, &args_0);
         FX_COPY_PTR(v_320.t1, &rt_0);
         FX_CALL(
            _fx_M11C_gen_typesFM15ktyp2ctyp_fargsLN14C_form__ctyp_t3LN14K_form__ktyp_tN14K_form__ktyp_tR10Ast__loc_t(args_0,
               rt_0, loc_0, &v_321, 0), _fx_catch_31);
         FX_CALL(_fx_cons_LN14C_form__ctyp_t(_fx_g23C_form__std_CTypVoidPtr, v_321, true, &cargs_1), _fx_catch_31);
         FX_CALL(
            _fx_M6C_formFM13CTypFunRawPtrN14C_form__ctyp_t2LN14C_form__ctyp_tN14C_form__ctyp_t(cargs_1,
               _fx_g21C_gen_types__CTypCInt, &ctyp_1), _fx_catch_31);
         _fx_make_T2R9Ast__id_tN14C_form__ctyp_t(&f_3, ctyp_1, &tup_4);
         _fx_LT2R9Ast__id_tN14C_form__ctyp_t node_1 = 0;
         FX_CALL(_fx_cons_LT2R9Ast__id_tN14C_form__ctyp_t(&tup_4, 0, false, &node_1), _fx_catch_31);
         FX_LIST_APPEND(vtbl_elems_0, lstend_1, node_1);

      _fx_catch_31: ;
         _fx_free_T2R9Ast__id_tN14C_form__ctyp_t(&tup_4);
         if (ctyp_1) {
            _fx_free_N14C_form__ctyp_t(&ctyp_1);
         }
         if (cargs_1) {
            _fx_free_LN14C_form__ctyp_t(&cargs_1);
         }
         if (v_321) {
            _fx_free_LN14C_form__ctyp_t(&v_321);
         }
         if (rt_0) {
            _fx_free_N14K_form__ktyp_t(&rt_0);
         }
         if (args_0) {
            _fx_free_LN14K_form__ktyp_t(&args_0);
         }
         _fx_free_T2LN14K_form__ktyp_tN14K_form__ktyp_t(&v_320);
         if (t_0) {
            _fx_free_N14K_form__ktyp_t(&t_0);
         }
         FX_CHECK_EXN(_fx_catch_32);
      }
      _fx_Ta2R9Ast__id_t v_329 = { _fx_g25C_form__std_FX_FREE_IFACE, _fx_g25C_form__std_fx_free_iface };
      _fx_Ta2R9Ast__id_t v_330 = { _fx_g25C_form__std_FX_COPY_IFACE, _fx_g25C_form__std_fx_copy_iface };
      _fx_make_R17C_form__ctprops_t(false, true, false, true, 0, &v_329, &v_330, &ctp_0);
      _fx_R9Ast__id_t v_331;
      fx_str_t slit_42 = FX_MAKE_STR("vtbl");
      FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&slit_42, &v_331, 0), _fx_catch_32);
      FX_CALL(_fx_M6C_formFM8CTypNameN14C_form__ctyp_t1R9Ast__id_t(&vtbl_id_0, &v_303), _fx_catch_32);
      FX_CALL(_fx_M6C_formFM14make_const_ptrN14C_form__ctyp_t1N14C_form__ctyp_t(v_303, &v_304, 0), _fx_catch_32);
      _fx_make_T2R9Ast__id_tN14C_form__ctyp_t(&v_331, v_304, &v_305);
      _fx_R9Ast__id_t v_332;
      fx_str_t slit_43 = FX_MAKE_STR("obj");
      FX_CALL(_fx_M3AstFM6get_idRM4id_t1S(&slit_43, &v_332, 0), _fx_catch_32);
      _fx_make_T2R9Ast__id_tN14C_form__ctyp_t(&v_332, _fx_g23C_form__std_CTypVoidPtr, &v_306);
      FX_CALL(_fx_cons_LT2R9Ast__id_tN14C_form__ctyp_t(&v_306, 0, true, &v_307), _fx_catch_32);
      FX_CALL(_fx_cons_LT2R9Ast__id_tN14C_form__ctyp_t(&v_305, v_307, true, &relems_12), _fx_catch_32);
      FX_CALL(_fx_M6C_formFM14CDefForwardTypN15C_form__cstmt_t2R9Ast__id_tR10Ast__loc_t(&ki_name_0, loc_0, &v_308),
         _fx_catch_32);
      FX_CALL(
         _fx_M11C_gen_typesFM12add_fwd_declv5R9Ast__id_tBN15C_form__cstmt_trRt6Set__t1R9Ast__id_trLN15C_form__cstmt_t(tn_0,
            true, v_308, all_fwd_decls_ref_0, top_fwd_decl_ref_0, 0), _fx_catch_32);
      _fx_Nt6option1R9Ast__id_t v_333;
      _fx_M11C_gen_typesFM4SomeNt6option1R9Ast__id_t1R9Ast__id_t(&vtbl_id_0, &v_333);
      FX_CALL(
         _fx_M6C_formFM10CTypStructN14C_form__ctyp_t2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t(&v_333, vtbl_elems_0,
            &v_309), _fx_catch_32);
      _fx_Ta2R9Ast__id_t v_334 = { _fx_g9Ast__noid, _fx_g9Ast__noid };
      _fx_Ta2R9Ast__id_t v_335 = { _fx_g9Ast__noid, _fx_g9Ast__noid };
      _fx_make_R17C_form__ctprops_t(false, false, true, true, 0, &v_334, &v_335, &v_310);
      _fx_make_R17C_form__cdeftyp_t(&vtbl_id_0, v_309, &vtbl_cname_0, &v_310, 0, &_fx_g9Ast__noid, 0, &_fx_g9Ast__noid,
         ki_scope_0, &ki_loc_0, &v_311);
      FX_CALL(_fx_make_rR17C_form__cdeftyp_t(&v_311, &vtbl_decl_0), _fx_catch_32);
      _fx_M6C_formFM4CTypN15C_form__cinfo_t1rRM9cdeftyp_t(vtbl_decl_0, &v_312);
      FX_CALL(_fx_M6C_formFM13set_idc_entryv2R9Ast__id_tN15C_form__cinfo_t(&vtbl_id_0, &v_312, 0), _fx_catch_32);
      FX_CALL(_fx_M6C_formFM7CDefTypN15C_form__cstmt_t1rRM9cdeftyp_t(vtbl_decl_0, &v_313), _fx_catch_32);
      FX_CALL(
         _fx_M11C_gen_typesFM8add_declv5R9Ast__id_tN15C_form__cstmt_trRt6Set__t1R9Ast__id_trLN15C_form__cstmt_trLN15C_form__cstmt_t(
            &vtbl_id_0, v_313, all_decls_ref_0, top_typ_decl_ref_0, top_typfun_decl_ref_0, 0), _fx_catch_32);
      FX_CALL(_fx_M6C_formFM13CDefInterfaceN15C_form__cstmt_t1rRM15cdefinterface_t(iface_decl_0, &v_314), _fx_catch_32);
      FX_CALL(_fx_cons_LN15C_form__cstmt_t(v_314, *top_typ_decl_0, true, &v_315), _fx_catch_32);
      _fx_free_LN15C_form__cstmt_t(top_typ_decl_0);
      FX_COPY_PTR(v_315, top_typ_decl_0);
      _fx_R17C_form__cdeftyp_t* v_336 = &struct_decl_0->data;
      _fx_Nt6option1R9Ast__id_t v_337;
      _fx_M11C_gen_typesFM4SomeNt6option1R9Ast__id_t1R9Ast__id_t(&ki_name_0, &v_337);
      FX_CALL(
         _fx_M6C_formFM10CTypStructN14C_form__ctyp_t2Nt6option1R9Ast__id_tLT2R9Ast__id_tN14C_form__ctyp_t(&v_337, relems_12,
            &v_316), _fx_catch_32);
      _fx_make_R17C_form__cdeftyp_t(&v_336->ct_name, v_316, &v_336->ct_cname, &ctp_0, v_336->ct_data_start, &v_336->ct_enum,
         v_336->ct_ifaces, &v_336->ct_ifaces_id, v_336->ct_scope, &v_336->ct_loc, &v_317);
      _fx_R17C_form__cdeftyp_t* v_338 = &struct_decl_0->data;
      _fx_free_R17C_form__cdeftyp_t(v_338);
      _fx_copy_R17C_form__cdeftyp_t(&v_317, v_338);
      _fx_R23C_form__cdefinterface_t* v_339 = &iface_decl_0->data;
      _fx_make_R23C_form__cdefinterface_t(&v_339->ci_name, &v_339->ci_cname, &v_339->ci_id, &v_339->ci_vtbl, &v_339->ci_base,
         vtbl_elems_0, v_339->ci_scope, &v_339->ci_loc, &v_318);
      _fx_R23C_form__cdefinterface_t* v_340 = &iface_decl_0->data;
      _fx_free_R23C_form__cdefinterface_t(v_340);
      _fx_copy_R23C_form__cdefinterface_t(&v_318, v_340);

   _fx_catch_32: ;
      _fx_free_R23C_form__cdefinterface_t(&v_318);
      _fx_free_R17C_form__cdeftyp_t(&v_317);
      if (v_316) {
         _fx_free_N14C_form__ctyp_t(&v_316);
      }
      if (v_315) {
         _fx_free_LN15C_form__cstmt_t(&v_315);
      }
      if (v_314) {
         _fx_free_N15C_form__cstmt_t(&v_314);
      }
      if (v_313) {
         _fx_free_N15C_form__cstmt_t(&v_313);
      }
      _fx_free_N15C_form__cinfo_t(&v_312);
      if (vtbl_decl_0) {
         _fx_free_rR17C_form__cdeftyp_t(&vtbl_decl_0);
      }
      _fx_free_R17C_form__cdeftyp_t(&v_311);
      _fx_free_R17C_form__ctprops_t(&v_310);
      if (v_309) {
         _fx_free_N14C_form__ctyp_t(&v_309);
      }
      if (v_308) {
         _fx_free_N15C_form__cstmt_t(&v_308);
      }
      if (relems_12) {
         _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&relems_12);
      }
      if (v_307) {
         _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&v_307);
      }
      _fx_free_T2R9Ast__id_tN14C_form__ctyp_t(&v_306);
      _fx_free_T2R9Ast__id_tN14C_form__ctyp_t(&v_305);
      if (v_304) {
         _fx_free_N14C_form__ctyp_t(&v_304);
      }
      if (v_303) {
         _fx_free_N14C_form__ctyp_t(&v_303);
      }
      _fx_free_R17C_form__ctprops_t(&ctp_0);
      if (vtbl_elems_0) {
         _fx_free_LT2R9Ast__id_tN14C_form__ctyp_t(&vtbl_elems_0);
      }
      _fx_free_N15C_form__cinfo_t(&v_302);
      if (iface_decl_0) {
         _fx_free_rR23C_form__cdefinterface_t(&iface_decl_0);
      }
      _fx_free_R23C_form__cdefinterface_t(&v_301);
      FX_FREE_STR(&vtbl_cname_0);
      FX_FREE_STR(&v_300);
      FX_FREE_STR(&v_299);
      FX_FREE_STR(&v_298);
      FX_FREE_STR(&ki_cname_0);
      if (ki_all_methods_0) {
         _fx_free_LT2R9Ast__id_tN14K_form__ktyp_t(&ki_all_methods_0);
      }
      FX_FREE_LIST_SIMPLE(&ki_scope_0);
   }
   else {
      fx_str_t v_341 = {0};
      fx_str_t v_342 = {0};
      fx_str_t v_343 = {0};
      fx_exn_t v_344 = {0};
      FX_CALL(_fx_M6K_formFM7idk2strS2R9Ast__id_tR10Ast__loc_t(tn_0, loc_0, &v_341, 0), _fx_catch_33);
      FX_CALL(_fx_M11C_gen_typesFM6stringS1S(&v_341, &v_342, 0), _fx_catch_33);
      fx_str_t slit_44 = FX_MAKE_STR("type \'");
      fx_str_t slit_45 = FX_MAKE_STR("\' cannot be converted to C");
      {
         const fx_str_t strs_16[] = { slit_44, v_342, slit_45 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_16, 3, &v_343), _fx_catch_33);
      }
      FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(loc_0, &v_343, &v_344, 0), _fx_catch_33);
      FX_THROW(&v_344, false, _fx_catch_33);

   _fx_catch_33: ;
      fx_free_exn(&v_344);
      FX_FREE_STR(&v_343);
      FX_FREE_STR(&v_342);
      FX_FREE_STR(&v_341);
   }

_fx_cleanup: ;
   _fx_free_Rt6Set__t1R9Ast__id_t(&deps_0);
   _fx_free_N15K_form__kinfo_t(&kt_info_0);
   _fx_free_T3BBRt6Set__t1R9Ast__id_t(&v_0);
   _fx_free_Rt6Set__t1R9Ast__id_t(&deps_1);
   _fx_free_Rt6Set__t1R9Ast__id_t(&v_1);
   if (v_2) {
      _fx_free_N14K_form__ktyp_t(&v_2);
   }
   if (fx_result_exp_0) {
      _fx_free_N14C_form__cexp_t(&fx_result_exp_0);
   }
   if (fx_result_ct_0) {
      _fx_free_N14C_form__ctyp_t(&fx_result_ct_0);
   }
   _fx_free_R29C_gen_types__ctyp_temp_info_t(&v_3);
   _fx_free_Nt6option1R29C_gen_types__ctyp_temp_info_t(&v_4);
   FX_FREE_STR(&tp_cname_wo_prefix_0);
   if (dst_exp_0) {
      _fx_free_N14C_form__cexp_t(&dst_exp_0);
   }
   if (src_exp_0) {
      _fx_free_N14C_form__cexp_t(&src_exp_0);
   }
   if (copyf_decl_0) {
      _fx_free_rR17C_form__cdeffun_t(&copyf_decl_0);
   }
   if (freef_decl_0) {
      _fx_free_rR17C_form__cdeffun_t(&freef_decl_0);
   }
   if (struct_decl_0) {
      _fx_free_rR17C_form__cdeftyp_t(&struct_decl_0);
   }
   _fx_free_R17C_form__ctprops_t(&ct_props_0);
   _fx_free_R17C_form__cdeftyp_t(&v_5);
   _fx_free_T2N14C_form__ctyp_tNt6option1R9Ast__id_t(&v_6);
   if (struct_typ_0) {
      _fx_free_N14C_form__ctyp_t(&struct_typ_0);
   }
   _fx_free_Rt6Set__t1R9Ast__id_t(&v_7);
   FX_FREE_FP(&__lambda___0);
   return fx_status;
}

static int _fx_M11C_gen_typesFM10__lambda__B1R9Ast__id_t(struct _fx_R9Ast__id_t* d_0, bool* fx_result, void* fx_fv)
{
   int fx_status = 0;
   _fx_M11C_gen_typesFM10__lambda__B1R9Ast__id_t_cldata_t* cv_0 =
      (_fx_M11C_gen_typesFM10__lambda__B1R9Ast__id_t_cldata_t*)fx_fv;
   bool res_0;
   FX_CALL(_fx_M3AstFM6__eq__B2RM4id_tRM4id_t(d_0, &cv_0->t0, &res_0, 0), _fx_cleanup);
   *fx_result = !res_0;

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM7make_fpFPB1R9Ast__id_t1R9Ast__id_t(
   struct _fx_R9Ast__id_t* arg0,
   struct _fx_FPB1R9Ast__id_t* fx_result)
{
   FX_MAKE_FP_IMPL_START(_fx_M11C_gen_typesFM10__lambda__B1R9Ast__id_t_cldata_t, fx_free,
      _fx_M11C_gen_typesFM10__lambda__B1R9Ast__id_t);
   fcv->t0 = *arg0;
   return 0;
}

static int _fx_M11C_gen_typesFM10__lambda__v1R9Ast__id_t(struct _fx_R9Ast__id_t* dep_0, void* fx_fv)
{
   _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t v_0 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t v_1 = {0};
   _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t t_0 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_0 = {0};
   _fx_Nt11Set__tree_t1R9Ast__id_t v_2 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t v_3 = {0};
   _fx_Nt11Set__tree_t1R9Ast__id_t t_1 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_1 = {0};
   int fx_status = 0;
   _fx_M11C_gen_typesFM10__lambda__v1R9Ast__id_t_cldata_t* cv_0 =
      (_fx_M11C_gen_typesFM10__lambda__v1R9Ast__id_t_cldata_t*)fx_fv;
   _fx_rRt6Set__t1R9Ast__id_t all_decls_ref_0 = cv_0->t0;
   _fx_rRt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t all_saved_rec_vars_ref_0 = cv_0->t2;
   _fx_Rt6Set__t1R9Ast__id_t* all_decls_0 = &all_decls_ref_0->data;
   _fx_Rt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t* all_saved_rec_vars_0 = &all_saved_rec_vars_ref_0->data;
   FX_COPY_PTR(all_saved_rec_vars_0->root, &v_0);
   FX_COPY_FP(&all_saved_rec_vars_0->cmp, &v_1);
   bool result_0 = 0;
   FX_COPY_PTR(v_0, &t_0);
   _fx_R9Ast__id_t xk_0 = *dep_0;
   FX_COPY_FP(&v_1, &cmp_0);
   for (;;) {
      _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t t_2 = 0;
      _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_2 = {0};
      FX_COPY_PTR(t_0, &t_2);
      _fx_R9Ast__id_t xk_1 = xk_0;
      FX_COPY_FP(&cmp_0, &cmp_2);
      if ((t_2 != 0) + 1 == 2) {
         _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_tR9Ast__id_tR29C_gen_types__ctyp_temp_info_tNt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t*
            vcase_0 = &t_2->u.Node;
         int_ c_0;
         FX_CALL(cmp_2.fp(&xk_1, &vcase_0->t2, &c_0, cmp_2.fcv), _fx_catch_0);
         if (c_0 < 0) {
            _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t* l_0 = &vcase_0->t1;
            _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&t_0);
            FX_COPY_PTR(*l_0, &t_0);
            xk_0 = xk_1;
            FX_FREE_FP(&cmp_0);
            FX_COPY_FP(&cmp_2, &cmp_0);
         }
         else if (c_0 > 0) {
            _fx_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t* r_0 = &vcase_0->t4;
            _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&t_0);
            FX_COPY_PTR(*r_0, &t_0);
            xk_0 = xk_1;
            FX_FREE_FP(&cmp_0);
            FX_COPY_FP(&cmp_2, &cmp_0);
         }
         else {
            result_0 = true; FX_BREAK(_fx_catch_0);
         }

      _fx_catch_0: ;
      }
      else {
         result_0 = false; FX_BREAK(_fx_catch_1);  _fx_catch_1: ;
      }
      FX_CHECK_EXN(_fx_catch_2);

   _fx_catch_2: ;
      FX_FREE_FP(&cmp_2);
      if (t_2) {
         _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&t_2);
      }
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   if (!result_0) {
      _fx_R10Ast__loc_t dep_loc_0;
      FX_CALL(_fx_M6K_formFM11get_idk_locR10Ast__loc_t2R9Ast__id_tR10Ast__loc_t(dep_0, &cv_0->t5, &dep_loc_0, 0), _fx_cleanup);
      FX_COPY_PTR(all_decls_0->root, &v_2);
      FX_COPY_FP(&all_decls_0->cmp, &v_3);
      bool result_1 = 0;
      FX_COPY_PTR(v_2, &t_1);
      _fx_R9Ast__id_t x_0 = *dep_0;
      FX_COPY_FP(&v_3, &cmp_1);
      for (;;) {
         _fx_Nt11Set__tree_t1R9Ast__id_t t_3 = 0;
         _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_3 = {0};
         FX_COPY_PTR(t_1, &t_3);
         _fx_R9Ast__id_t x_1 = x_0;
         FX_COPY_FP(&cmp_1, &cmp_3);
         if ((t_3 != 0) + 1 == 2) {
            _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* vcase_1 = &t_3->u.Node;
            int_ c_1;
            FX_CALL(cmp_3.fp(&x_1, &vcase_1->t2, &c_1, cmp_3.fcv), _fx_catch_3);
            if (c_1 < 0) {
               _fx_Nt11Set__tree_t1R9Ast__id_t* l_1 = &vcase_1->t1;
               _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_1);
               FX_COPY_PTR(*l_1, &t_1);
               x_0 = x_1;
               FX_FREE_FP(&cmp_1);
               FX_COPY_FP(&cmp_3, &cmp_1);
            }
            else if (c_1 > 0) {
               _fx_Nt11Set__tree_t1R9Ast__id_t* r_1 = &vcase_1->t3;
               _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_1);
               FX_COPY_PTR(*r_1, &t_1);
               x_0 = x_1;
               FX_FREE_FP(&cmp_1);
               FX_COPY_FP(&cmp_3, &cmp_1);
            }
            else {
               result_1 = true; FX_BREAK(_fx_catch_3);
            }

         _fx_catch_3: ;
         }
         else {
            result_1 = false; FX_BREAK(_fx_catch_4);  _fx_catch_4: ;
         }
         FX_CHECK_EXN(_fx_catch_5);

      _fx_catch_5: ;
         FX_FREE_FP(&cmp_3);
         if (t_3) {
            _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_3);
         }
         FX_CHECK_BREAK();
         FX_CHECK_EXN(_fx_cleanup);
      }
      if (!result_1) {
         FX_CALL(
            _fx_M11C_gen_typesFM9cvt2ctyp_v10R9Ast__id_tR10Ast__loc_trRt6Set__t1R9Ast__id_trRt6Set__t1R9Ast__id_trRt6Map__t2R9Ast__id_tRM16ctyp_temp_info_trRt6Set__t1R9Ast__id_trirLN15C_form__cstmt_trLN15C_form__cstmt_trLN15C_form__cstmt_t(
               dep_0, &dep_loc_0, all_decls_ref_0, cv_0->t1, all_saved_rec_vars_ref_0, cv_0->t3, cv_0->t4, cv_0->t6, cv_0->t7,
               cv_0->t8, 0), _fx_cleanup);
      }
   }

_fx_cleanup: ;
   if (v_0) {
      _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&v_0);
   }
   FX_FREE_FP(&v_1);
   if (t_0) {
      _fx_free_Nt11Map__tree_t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t(&t_0);
   }
   FX_FREE_FP(&cmp_0);
   if (v_2) {
      _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_2);
   }
   FX_FREE_FP(&v_3);
   if (t_1) {
      _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_1);
   }
   FX_FREE_FP(&cmp_1);
   return fx_status;
}

FX_EXTERN_C int
   _fx_M11C_gen_typesFM7make_fpFPv1R9Ast__id_t9rRt6Set__t1R9Ast__id_trRt6Set__t1R9Ast__id_trRt6Map__t2R9Ast__id_tRM16ctyp_temp_info_trRt6Set__t1R9Ast__id_triR10Ast__loc_trLN15C_form__cstmt_trLN15C_form__cstmt_trLN15C_form__cstmt_t(
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* arg0,
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* arg1,
   struct _fx_rRt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t* arg2,
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* arg3,
   struct _fx_ri_data_t* arg4,
   struct _fx_R10Ast__loc_t* arg5,
   struct _fx_rLN15C_form__cstmt_t_data_t* arg6,
   struct _fx_rLN15C_form__cstmt_t_data_t* arg7,
   struct _fx_rLN15C_form__cstmt_t_data_t* arg8,
   struct _fx_FPv1R9Ast__id_t* fx_result)
{
   FX_MAKE_FP_IMPL_START(_fx_M11C_gen_typesFM10__lambda__v1R9Ast__id_t_cldata_t,
      _fx_free_M11C_gen_typesFM10__lambda__v1R9Ast__id_t, _fx_M11C_gen_typesFM10__lambda__v1R9Ast__id_t);
   FX_COPY_PTR(arg0, &fcv->t0);
   FX_COPY_PTR(arg1, &fcv->t1);
   FX_COPY_PTR(arg2, &fcv->t2);
   FX_COPY_PTR(arg3, &fcv->t3);
   FX_COPY_PTR(arg4, &fcv->t4);
   fcv->t5 = *arg5;
   FX_COPY_PTR(arg6, &fcv->t6);
   FX_COPY_PTR(arg7, &fcv->t7);
   FX_COPY_PTR(arg8, &fcv->t8);
   return 0;
}

static int _fx_M11C_gen_typesFM15fold_n_cvt_kexpv2N14K_form__kexp_tR22K_form__k_fold_callb_t(
   struct _fx_N14K_form__kexp_t_data_t* e_0,
   struct _fx_R22K_form__k_fold_callb_t* callb_0,
   void* fx_fv)
{
   int fx_status = 0;
   _fx_M11C_gen_typesFM15fold_n_cvt_kexpv2N14K_form__kexp_tR22K_form__k_fold_callb_t_cldata_t* cv_0 =
      (_fx_M11C_gen_typesFM15fold_n_cvt_kexpv2N14K_form__kexp_tR22K_form__k_fold_callb_t_cldata_t*)fx_fv;
   _fx_rRt6Set__t1R9Ast__id_t all_decls_ref_0 = cv_0->t0;
   _fx_rRt6Set__t1R9Ast__id_t all_fwd_decls_ref_0 = cv_0->t1;
   _fx_rRt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t all_saved_rec_vars_ref_0 = cv_0->t2;
   _fx_rRt6Set__t1R9Ast__id_t all_visited_ref_0 = cv_0->t3;
   _fx_ri curr_cm_idx_ref_0 = cv_0->t4;
   _fx_rLN15C_form__cstmt_t top_fwd_decl_ref_0 = cv_0->t5;
   _fx_rLN15C_form__cstmt_t top_typ_decl_ref_0 = cv_0->t6;
   _fx_rLN15C_form__cstmt_t top_typfun_decl_ref_0 = cv_0->t7;
   _fx_Rt6Set__t1R9Ast__id_t* all_decls_0 = &all_decls_ref_0->data;
   int tag_0 = FX_REC_VARIANT_TAG(e_0);
   if (tag_0 == 36) {
      _fx_R17K_form__kdeftyp_t v_0 = {0};
      _fx_Nt11Set__tree_t1R9Ast__id_t v_1 = 0;
      _fx_FPi2R9Ast__id_tR9Ast__id_t v_2 = {0};
      _fx_Nt11Set__tree_t1R9Ast__id_t t_0 = 0;
      _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_0 = {0};
      _fx_copy_R17K_form__kdeftyp_t(&e_0->u.KDefTyp->data, &v_0);
      _fx_R9Ast__id_t* kt_name_0 = &v_0.kt_name;
      FX_COPY_PTR(all_decls_0->root, &v_1);
      FX_COPY_FP(&all_decls_0->cmp, &v_2);
      bool result_0 = 0;
      FX_COPY_PTR(v_1, &t_0);
      _fx_R9Ast__id_t x_0 = *kt_name_0;
      FX_COPY_FP(&v_2, &cmp_0);
      for (;;) {
         _fx_Nt11Set__tree_t1R9Ast__id_t t_1 = 0;
         _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_1 = {0};
         FX_COPY_PTR(t_0, &t_1);
         _fx_R9Ast__id_t x_1 = x_0;
         FX_COPY_FP(&cmp_0, &cmp_1);
         if ((t_1 != 0) + 1 == 2) {
            _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* vcase_0 = &t_1->u.Node;
            int_ c_0;
            FX_CALL(cmp_1.fp(&x_1, &vcase_0->t2, &c_0, cmp_1.fcv), _fx_catch_0);
            if (c_0 < 0) {
               _fx_Nt11Set__tree_t1R9Ast__id_t* l_0 = &vcase_0->t1;
               _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_0);
               FX_COPY_PTR(*l_0, &t_0);
               x_0 = x_1;
               FX_FREE_FP(&cmp_0);
               FX_COPY_FP(&cmp_1, &cmp_0);
            }
            else if (c_0 > 0) {
               _fx_Nt11Set__tree_t1R9Ast__id_t* r_0 = &vcase_0->t3;
               _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_0);
               FX_COPY_PTR(*r_0, &t_0);
               x_0 = x_1;
               FX_FREE_FP(&cmp_0);
               FX_COPY_FP(&cmp_1, &cmp_0);
            }
            else {
               result_0 = true; FX_BREAK(_fx_catch_0);
            }

         _fx_catch_0: ;
         }
         else {
            result_0 = false; FX_BREAK(_fx_catch_1);  _fx_catch_1: ;
         }
         FX_CHECK_EXN(_fx_catch_2);

      _fx_catch_2: ;
         FX_FREE_FP(&cmp_1);
         if (t_1) {
            _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_1);
         }
         FX_CHECK_BREAK();
         FX_CHECK_EXN(_fx_catch_3);
      }
      if (!result_0) {
         FX_CALL(
            _fx_M11C_gen_typesFM9cvt2ctyp_v10R9Ast__id_tR10Ast__loc_trRt6Set__t1R9Ast__id_trRt6Set__t1R9Ast__id_trRt6Map__t2R9Ast__id_tRM16ctyp_temp_info_trRt6Set__t1R9Ast__id_trirLN15C_form__cstmt_trLN15C_form__cstmt_trLN15C_form__cstmt_t(
               kt_name_0, &v_0.kt_loc, all_decls_ref_0, all_fwd_decls_ref_0, all_saved_rec_vars_ref_0, all_visited_ref_0,
               curr_cm_idx_ref_0, top_fwd_decl_ref_0, top_typ_decl_ref_0, top_typfun_decl_ref_0, 0), _fx_catch_3);
      }

   _fx_catch_3: ;
      FX_FREE_FP(&cmp_0);
      if (t_0) {
         _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_0);
      }
      FX_FREE_FP(&v_2);
      if (v_1) {
         _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_1);
      }
      _fx_free_R17K_form__kdeftyp_t(&v_0);
   }
   else if (tag_0 == 34) {
      _fx_R21K_form__kdefvariant_t v_3 = {0};
      _fx_Nt11Set__tree_t1R9Ast__id_t v_4 = 0;
      _fx_FPi2R9Ast__id_tR9Ast__id_t v_5 = {0};
      _fx_Nt11Set__tree_t1R9Ast__id_t t_2 = 0;
      _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_2 = {0};
      _fx_copy_R21K_form__kdefvariant_t(&e_0->u.KDefVariant->data, &v_3);
      _fx_R9Ast__id_t* kvar_name_0 = &v_3.kvar_name;
      FX_COPY_PTR(all_decls_0->root, &v_4);
      FX_COPY_FP(&all_decls_0->cmp, &v_5);
      bool result_1 = 0;
      FX_COPY_PTR(v_4, &t_2);
      _fx_R9Ast__id_t x_2 = *kvar_name_0;
      FX_COPY_FP(&v_5, &cmp_2);
      for (;;) {
         _fx_Nt11Set__tree_t1R9Ast__id_t t_3 = 0;
         _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_3 = {0};
         FX_COPY_PTR(t_2, &t_3);
         _fx_R9Ast__id_t x_3 = x_2;
         FX_COPY_FP(&cmp_2, &cmp_3);
         if ((t_3 != 0) + 1 == 2) {
            _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* vcase_1 = &t_3->u.Node;
            int_ c_1;
            FX_CALL(cmp_3.fp(&x_3, &vcase_1->t2, &c_1, cmp_3.fcv), _fx_catch_4);
            if (c_1 < 0) {
               _fx_Nt11Set__tree_t1R9Ast__id_t* l_1 = &vcase_1->t1;
               _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_2);
               FX_COPY_PTR(*l_1, &t_2);
               x_2 = x_3;
               FX_FREE_FP(&cmp_2);
               FX_COPY_FP(&cmp_3, &cmp_2);
            }
            else if (c_1 > 0) {
               _fx_Nt11Set__tree_t1R9Ast__id_t* r_1 = &vcase_1->t3;
               _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_2);
               FX_COPY_PTR(*r_1, &t_2);
               x_2 = x_3;
               FX_FREE_FP(&cmp_2);
               FX_COPY_FP(&cmp_3, &cmp_2);
            }
            else {
               result_1 = true; FX_BREAK(_fx_catch_4);
            }

         _fx_catch_4: ;
         }
         else {
            result_1 = false; FX_BREAK(_fx_catch_5);  _fx_catch_5: ;
         }
         FX_CHECK_EXN(_fx_catch_6);

      _fx_catch_6: ;
         FX_FREE_FP(&cmp_3);
         if (t_3) {
            _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_3);
         }
         FX_CHECK_BREAK();
         FX_CHECK_EXN(_fx_catch_7);
      }
      if (!result_1) {
         FX_CALL(
            _fx_M11C_gen_typesFM9cvt2ctyp_v10R9Ast__id_tR10Ast__loc_trRt6Set__t1R9Ast__id_trRt6Set__t1R9Ast__id_trRt6Map__t2R9Ast__id_tRM16ctyp_temp_info_trRt6Set__t1R9Ast__id_trirLN15C_form__cstmt_trLN15C_form__cstmt_trLN15C_form__cstmt_t(
               kvar_name_0, &v_3.kvar_loc, all_decls_ref_0, all_fwd_decls_ref_0, all_saved_rec_vars_ref_0, all_visited_ref_0,
               curr_cm_idx_ref_0, top_fwd_decl_ref_0, top_typ_decl_ref_0, top_typfun_decl_ref_0, 0), _fx_catch_7);
      }

   _fx_catch_7: ;
      FX_FREE_FP(&cmp_2);
      if (t_2) {
         _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_2);
      }
      FX_FREE_FP(&v_5);
      if (v_4) {
         _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_4);
      }
      _fx_free_R21K_form__kdefvariant_t(&v_3);
   }
   else if (tag_0 != 37) {
      if (tag_0 != 33) {
         FX_CALL(_fx_M6K_formFM9fold_kexpv2N14K_form__kexp_tRM14k_fold_callb_t(e_0, callb_0, 0), _fx_catch_8);  _fx_catch_8: ;
      }
   }
   return fx_status;
}

FX_EXTERN_C int
   _fx_M11C_gen_typesFM7make_fpFPv2N14K_form__kexp_tR22K_form__k_fold_callb_t8rRt6Set__t1R9Ast__id_trRt6Set__t1R9Ast__id_trRt6Map__t2R9Ast__id_tRM16ctyp_temp_info_trRt6Set__t1R9Ast__id_trirLN15C_form__cstmt_trLN15C_form__cstmt_trLN15C_form__cstmt_t(
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* arg0,
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* arg1,
   struct _fx_rRt6Map__t2R9Ast__id_tR29C_gen_types__ctyp_temp_info_t_data_t* arg2,
   struct _fx_rRt6Set__t1R9Ast__id_t_data_t* arg3,
   struct _fx_ri_data_t* arg4,
   struct _fx_rLN15C_form__cstmt_t_data_t* arg5,
   struct _fx_rLN15C_form__cstmt_t_data_t* arg6,
   struct _fx_rLN15C_form__cstmt_t_data_t* arg7,
   struct _fx_FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t* fx_result)
{
   FX_MAKE_FP_IMPL_START(_fx_M11C_gen_typesFM15fold_n_cvt_kexpv2N14K_form__kexp_tR22K_form__k_fold_callb_t_cldata_t,
      _fx_free_M11C_gen_typesFM15fold_n_cvt_kexpv2N14K_form__kexp_tR22K_form__k_fold_callb_t,
      _fx_M11C_gen_typesFM15fold_n_cvt_kexpv2N14K_form__kexp_tR22K_form__k_fold_callb_t);
   FX_COPY_PTR(arg0, &fcv->t0);
   FX_COPY_PTR(arg1, &fcv->t1);
   FX_COPY_PTR(arg2, &fcv->t2);
   FX_COPY_PTR(arg3, &fcv->t3);
   FX_COPY_PTR(arg4, &fcv->t4);
   FX_COPY_PTR(arg5, &fcv->t5);
   FX_COPY_PTR(arg6, &fcv->t6);
   FX_COPY_PTR(arg7, &fcv->t7);
   return 0;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM17used_ids_by_ccodeNt10Hashset__t1R9Ast__id_t2LN15C_form__cstmt_ti(
   struct _fx_LN15C_form__cstmt_t_data_t* ccode_0,
   int_ size0_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_Nt10Hashset__t1R9Ast__id_t used_ids_arg_0 = 0;
   _fx_rNt10Hashset__t1R9Ast__id_t used_ids_ref_0 = 0;
   _fx_FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t used_ctyp_0 = {0};
   _fx_FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t used_ids_by_cstmt_0 = {0};
   _fx_Nt6option1FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t v_0 = 0;
   _fx_Nt6option1FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t v_1 = 0;
   _fx_R22C_form__c_fold_callb_t callb_0 = {0};
   int fx_status = 0;
   FX_CALL(_fx_M3AstFM16empty_id_hashsetNt10Hashset__t1RM4id_t1i(size0_0, &used_ids_arg_0, 0), _fx_cleanup);
   FX_CALL(_fx_make_rNt10Hashset__t1R9Ast__id_t(used_ids_arg_0, &used_ids_ref_0), _fx_cleanup);
   _fx_M11C_gen_typesFM7make_fpFPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t1rNt10Hashset__t1R9Ast__id_t(used_ids_ref_0,
      &used_ctyp_0);
   _fx_M11C_gen_typesFM7make_fpFPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t1rNt10Hashset__t1R9Ast__id_t(used_ids_ref_0,
      &used_ids_by_cstmt_0);
   FX_CALL(
      _fx_M11C_gen_typesFM4SomeNt6option1FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t1FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t(
         &used_ctyp_0, &v_0), _fx_cleanup);
   FX_CALL(
      _fx_M11C_gen_typesFM4SomeNt6option1FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t1FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t(
         &used_ids_by_cstmt_0, &v_1), _fx_cleanup);
   _fx_make_R22C_form__c_fold_callb_t(_fx_g19C_gen_types__None2_, v_0, _fx_g19C_gen_types__None1_, v_1, &callb_0);
   _fx_LN15C_form__cstmt_t lst_0 = ccode_0;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_N15C_form__cstmt_t s_0 = lst_0->hd;
      FX_CALL(used_ids_by_cstmt_0.fp(s_0, &callb_0, used_ids_by_cstmt_0.fcv), _fx_catch_0);

   _fx_catch_0: ;
      FX_CHECK_EXN(_fx_cleanup);
   }
   FX_COPY_PTR(used_ids_ref_0->data, fx_result);

_fx_cleanup: ;
   if (used_ids_arg_0) {
      _fx_free_Nt10Hashset__t1R9Ast__id_t(&used_ids_arg_0);
   }
   if (used_ids_ref_0) {
      _fx_free_rNt10Hashset__t1R9Ast__id_t(&used_ids_ref_0);
   }
   FX_FREE_FP(&used_ctyp_0);
   FX_FREE_FP(&used_ids_by_cstmt_0);
   if (v_0) {
      _fx_free_Nt6option1FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t(&v_0);
   }
   if (v_1) {
      _fx_free_Nt6option1FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t(&v_1);
   }
   _fx_free_R22C_form__c_fold_callb_t(&callb_0);
   return fx_status;
}

static int _fx_M11C_gen_typesFM9used_ctypv2N14C_form__ctyp_tR22C_form__c_fold_callb_t(
   struct _fx_N14C_form__ctyp_t_data_t* t_0,
   struct _fx_R22C_form__c_fold_callb_t* callb_0,
   void* fx_fv)
{
   int fx_status = 0;
   _fx_M11C_gen_typesFM9used_ctypv2N14C_form__ctyp_tR22C_form__c_fold_callb_t_cldata_t* cv_0 =
      (_fx_M11C_gen_typesFM9used_ctypv2N14C_form__ctyp_tR22C_form__c_fold_callb_t_cldata_t*)fx_fv;
   _fx_Nt10Hashset__t1R9Ast__id_t* used_ids_0 = &cv_0->t0->data;
   FX_CALL(_fx_M6C_formFM9fold_ctypv2N14C_form__ctyp_tRM14c_fold_callb_t(t_0, callb_0, 0), _fx_cleanup);
   int tag_0 = FX_REC_VARIANT_TAG(t_0);
   if (tag_0 == 14) {
      _fx_Nt6option1R9Ast__id_t* v_0 = &t_0->u.CTypStruct.t0;
      if (v_0->tag == 2) {
         fx_str_t v_1 = {0};
         _fx_R9Ast__id_t* n_0 = &v_0->u.Some;
         bool v_2;
         if (n_0->m > 0) {
            v_2 = true;
         }
         else {
            FX_CALL(_fx_M3AstFM2ppS1RM4id_t(n_0, &v_1, 0), _fx_catch_0);
            bool v_3;
            fx_str_t slit_0 = FX_MAKE_STR("fx_");
            v_3 = _fx_M6StringFM10startswithB2SS(&v_1, &slit_0, 0);
            v_2 = !v_3;
         }
         if (v_2) {
            uint64_t __fold_result___0 = 14695981039346656037ULL;
            uint64_t h_0 = __fold_result___0 ^ ((uint64_t)n_0->m ^ 14695981039346656037ULL);
            __fold_result___0 = h_0 * 1099511628211ULL;
            uint64_t h_1 = __fold_result___0 ^ ((uint64_t)n_0->i ^ 14695981039346656037ULL);
            __fold_result___0 = h_1 * 1099511628211ULL;
            uint64_t h_2 = __fold_result___0 ^ ((uint64_t)n_0->j ^ 14695981039346656037ULL);
            __fold_result___0 = h_2 * 1099511628211ULL;
            FX_CALL(
               _fx_M11C_gen_typesFM4add_v3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(*used_ids_0, n_0,
                  __fold_result___0 & 9223372036854775807ULL, 0), _fx_catch_0);
         }

      _fx_catch_0: ;
         FX_FREE_STR(&v_1);
         goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 15) {
      _fx_Nt6option1R9Ast__id_t* v_4 = &t_0->u.CTypUnion.t0;
      if (v_4->tag == 2) {
         fx_str_t v_5 = {0};
         _fx_R9Ast__id_t* n_1 = &v_4->u.Some;
         bool v_6;
         if (n_1->m > 0) {
            v_6 = true;
         }
         else {
            FX_CALL(_fx_M3AstFM2ppS1RM4id_t(n_1, &v_5, 0), _fx_catch_1);
            bool v_7;
            fx_str_t slit_1 = FX_MAKE_STR("fx_");
            v_7 = _fx_M6StringFM10startswithB2SS(&v_5, &slit_1, 0);
            v_6 = !v_7;
         }
         if (v_6) {
            uint64_t __fold_result___1 = 14695981039346656037ULL;
            uint64_t h_3 = __fold_result___1 ^ ((uint64_t)n_1->m ^ 14695981039346656037ULL);
            __fold_result___1 = h_3 * 1099511628211ULL;
            uint64_t h_4 = __fold_result___1 ^ ((uint64_t)n_1->i ^ 14695981039346656037ULL);
            __fold_result___1 = h_4 * 1099511628211ULL;
            uint64_t h_5 = __fold_result___1 ^ ((uint64_t)n_1->j ^ 14695981039346656037ULL);
            __fold_result___1 = h_5 * 1099511628211ULL;
            FX_CALL(
               _fx_M11C_gen_typesFM4add_v3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(*used_ids_0, n_1,
                  __fold_result___1 & 9223372036854775807ULL, 0), _fx_catch_1);
         }

      _fx_catch_1: ;
         FX_FREE_STR(&v_5);
         goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 21) {
      fx_str_t v_8 = {0};
      _fx_R9Ast__id_t* n_2 = &t_0->u.CTypName;
      bool v_9;
      if (n_2->m > 0) {
         v_9 = true;
      }
      else {
         FX_CALL(_fx_M3AstFM2ppS1RM4id_t(n_2, &v_8, 0), _fx_catch_2);
         bool v_10;
         fx_str_t slit_2 = FX_MAKE_STR("fx_");
         v_10 = _fx_M6StringFM10startswithB2SS(&v_8, &slit_2, 0);
         v_9 = !v_10;
      }
      if (v_9) {
         uint64_t __fold_result___2 = 14695981039346656037ULL;
         uint64_t h_6 = __fold_result___2 ^ ((uint64_t)n_2->m ^ 14695981039346656037ULL);
         __fold_result___2 = h_6 * 1099511628211ULL;
         uint64_t h_7 = __fold_result___2 ^ ((uint64_t)n_2->i ^ 14695981039346656037ULL);
         __fold_result___2 = h_7 * 1099511628211ULL;
         uint64_t h_8 = __fold_result___2 ^ ((uint64_t)n_2->j ^ 14695981039346656037ULL);
         __fold_result___2 = h_8 * 1099511628211ULL;
         FX_CALL(
            _fx_M11C_gen_typesFM4add_v3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(*used_ids_0, n_2,
               __fold_result___2 & 9223372036854775807ULL, 0), _fx_catch_2);
      }

   _fx_catch_2: ;
      FX_FREE_STR(&v_8);
      goto _fx_endmatch_0;
   }

_fx_endmatch_0: ;

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM7make_fpFPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t1rNt10Hashset__t1R9Ast__id_t(
   struct _fx_rNt10Hashset__t1R9Ast__id_t_data_t* arg0,
   struct _fx_FPv2N14C_form__ctyp_tR22C_form__c_fold_callb_t* fx_result)
{
   FX_MAKE_FP_IMPL_START(_fx_M11C_gen_typesFM9used_ctypv2N14C_form__ctyp_tR22C_form__c_fold_callb_t_cldata_t,
      _fx_free_M11C_gen_typesFM9used_ctypv2N14C_form__ctyp_tR22C_form__c_fold_callb_t,
      _fx_M11C_gen_typesFM9used_ctypv2N14C_form__ctyp_tR22C_form__c_fold_callb_t);
   FX_COPY_PTR(arg0, &fcv->t0);
   return 0;
}

static int _fx_M11C_gen_typesFM17used_ids_by_cstmtv2N15C_form__cstmt_tR22C_form__c_fold_callb_t(
   struct _fx_N15C_form__cstmt_t_data_t* s_0,
   struct _fx_R22C_form__c_fold_callb_t* callb_0,
   void* fx_fv)
{
   int fx_status = 0;
   _fx_M11C_gen_typesFM17used_ids_by_cstmtv2N15C_form__cstmt_tR22C_form__c_fold_callb_t_cldata_t* cv_0 =
      (_fx_M11C_gen_typesFM17used_ids_by_cstmtv2N15C_form__cstmt_tR22C_form__c_fold_callb_t_cldata_t*)fx_fv;
   _fx_Nt10Hashset__t1R9Ast__id_t* used_ids_0 = &cv_0->t0->data;
   FX_CALL(_fx_M6C_formFM10fold_cstmtv2N15C_form__cstmt_tRM14c_fold_callb_t(s_0, callb_0, 0), _fx_cleanup);
   int tag_0 = FX_REC_VARIANT_TAG(s_0);
   if (tag_0 == 18) {
      _fx_R17C_form__cdeftyp_t v_0 = {0};
      _fx_LR9Ast__id_t v_1 = 0;
      _fx_LR9Ast__id_t ct_ifaces_0 = 0;
      fx_str_t v_2 = {0};
      _fx_copy_R17C_form__cdeftyp_t(&s_0->u.CDefTyp->data, &v_0);
      _fx_R17C_form__ctprops_t* v_3 = &v_0.ct_props;
      _fx_R9Ast__id_t* ct_ifaces_id_0 = &v_0.ct_ifaces_id;
      FX_CALL(_fx_cons_LR9Ast__id_t(&v_3->ctp_copy.t1, v_3->ctp_make, true, &v_1), _fx_catch_2);
      FX_CALL(_fx_cons_LR9Ast__id_t(&v_3->ctp_free.t1, v_1, false, &v_1), _fx_catch_2);
      FX_CALL(_fx_cons_LR9Ast__id_t(&v_0.ct_enum, v_1, false, &v_1), _fx_catch_2);
      _fx_LR9Ast__id_t lst_0 = v_1;
      for (; lst_0; lst_0 = lst_0->tl) {
         fx_str_t v_4 = {0};
         _fx_R9Ast__id_t* i_0 = &lst_0->hd;
         bool v_5;
         if (i_0->m > 0) {
            v_5 = true;
         }
         else {
            FX_CALL(_fx_M3AstFM2ppS1RM4id_t(i_0, &v_4, 0), _fx_catch_0);
            bool v_6;
            fx_str_t slit_0 = FX_MAKE_STR("fx_");
            v_6 = _fx_M6StringFM10startswithB2SS(&v_4, &slit_0, 0);
            v_5 = !v_6;
         }
         if (v_5) {
            uint64_t __fold_result___0 = 14695981039346656037ULL;
            uint64_t h_0 = __fold_result___0 ^ ((uint64_t)i_0->m ^ 14695981039346656037ULL);
            __fold_result___0 = h_0 * 1099511628211ULL;
            uint64_t h_1 = __fold_result___0 ^ ((uint64_t)i_0->i ^ 14695981039346656037ULL);
            __fold_result___0 = h_1 * 1099511628211ULL;
            uint64_t h_2 = __fold_result___0 ^ ((uint64_t)i_0->j ^ 14695981039346656037ULL);
            __fold_result___0 = h_2 * 1099511628211ULL;
            FX_CALL(
               _fx_M11C_gen_typesFM4add_v3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(*used_ids_0, i_0,
                  __fold_result___0 & 9223372036854775807ULL, 0), _fx_catch_0);
         }

      _fx_catch_0: ;
         FX_FREE_STR(&v_4);
         FX_CHECK_EXN(_fx_catch_2);
      }
      FX_COPY_PTR(v_0.ct_ifaces, &ct_ifaces_0);
      _fx_LR9Ast__id_t lst_1 = ct_ifaces_0;
      for (; lst_1; lst_1 = lst_1->tl) {
         fx_str_t v_7 = {0};
         _fx_R9Ast__id_t* i_1 = &lst_1->hd;
         bool v_8;
         if (i_1->m > 0) {
            v_8 = true;
         }
         else {
            FX_CALL(_fx_M3AstFM2ppS1RM4id_t(i_1, &v_7, 0), _fx_catch_1);
            bool v_9;
            fx_str_t slit_1 = FX_MAKE_STR("fx_");
            v_9 = _fx_M6StringFM10startswithB2SS(&v_7, &slit_1, 0);
            v_8 = !v_9;
         }
         if (v_8) {
            uint64_t __fold_result___1 = 14695981039346656037ULL;
            uint64_t h_3 = __fold_result___1 ^ ((uint64_t)i_1->m ^ 14695981039346656037ULL);
            __fold_result___1 = h_3 * 1099511628211ULL;
            uint64_t h_4 = __fold_result___1 ^ ((uint64_t)i_1->i ^ 14695981039346656037ULL);
            __fold_result___1 = h_4 * 1099511628211ULL;
            uint64_t h_5 = __fold_result___1 ^ ((uint64_t)i_1->j ^ 14695981039346656037ULL);
            __fold_result___1 = h_5 * 1099511628211ULL;
            FX_CALL(
               _fx_M11C_gen_typesFM4add_v3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(*used_ids_0, i_1,
                  __fold_result___1 & 9223372036854775807ULL, 0), _fx_catch_1);
         }

      _fx_catch_1: ;
         FX_FREE_STR(&v_7);
         FX_CHECK_EXN(_fx_catch_2);
      }
      bool v_10;
      if (ct_ifaces_id_0->m > 0) {
         v_10 = true;
      }
      else {
         FX_CALL(_fx_M3AstFM2ppS1RM4id_t(ct_ifaces_id_0, &v_2, 0), _fx_catch_2);
         bool v_11;
         fx_str_t slit_2 = FX_MAKE_STR("fx_");
         v_11 = _fx_M6StringFM10startswithB2SS(&v_2, &slit_2, 0);
         v_10 = !v_11;
      }
      if (v_10) {
         uint64_t __fold_result___2 = 14695981039346656037ULL;
         uint64_t h_6 = __fold_result___2 ^ ((uint64_t)ct_ifaces_id_0->m ^ 14695981039346656037ULL);
         __fold_result___2 = h_6 * 1099511628211ULL;
         uint64_t h_7 = __fold_result___2 ^ ((uint64_t)ct_ifaces_id_0->i ^ 14695981039346656037ULL);
         __fold_result___2 = h_7 * 1099511628211ULL;
         uint64_t h_8 = __fold_result___2 ^ ((uint64_t)ct_ifaces_id_0->j ^ 14695981039346656037ULL);
         __fold_result___2 = h_8 * 1099511628211ULL;
         FX_CALL(
            _fx_M11C_gen_typesFM4add_v3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(*used_ids_0, ct_ifaces_id_0,
               __fold_result___2 & 9223372036854775807ULL, 0), _fx_catch_2);
      }

   _fx_catch_2: ;
      FX_FREE_STR(&v_2);
      FX_FREE_LIST_SIMPLE(&ct_ifaces_0);
      FX_FREE_LIST_SIMPLE(&v_1);
      _fx_free_R17C_form__cdeftyp_t(&v_0);
   }
   else if (tag_0 == 22) {
      _fx_R23C_form__cdefinterface_t v_12 = {0};
      fx_str_t v_13 = {0};
      fx_str_t v_14 = {0};
      _fx_copy_R23C_form__cdefinterface_t(&s_0->u.CDefInterface->data, &v_12);
      _fx_R9Ast__id_t* ci_vtbl_0 = &v_12.ci_vtbl;
      _fx_R9Ast__id_t* ci_base_0 = &v_12.ci_base;
      bool v_15;
      if (ci_base_0->m > 0) {
         v_15 = true;
      }
      else {
         FX_CALL(_fx_M3AstFM2ppS1RM4id_t(ci_base_0, &v_13, 0), _fx_catch_3);
         bool v_16;
         fx_str_t slit_3 = FX_MAKE_STR("fx_");
         v_16 = _fx_M6StringFM10startswithB2SS(&v_13, &slit_3, 0);
         v_15 = !v_16;
      }
      if (v_15) {
         uint64_t __fold_result___3 = 14695981039346656037ULL;
         uint64_t h_9 = __fold_result___3 ^ ((uint64_t)ci_base_0->m ^ 14695981039346656037ULL);
         __fold_result___3 = h_9 * 1099511628211ULL;
         uint64_t h_10 = __fold_result___3 ^ ((uint64_t)ci_base_0->i ^ 14695981039346656037ULL);
         __fold_result___3 = h_10 * 1099511628211ULL;
         uint64_t h_11 = __fold_result___3 ^ ((uint64_t)ci_base_0->j ^ 14695981039346656037ULL);
         __fold_result___3 = h_11 * 1099511628211ULL;
         FX_CALL(
            _fx_M11C_gen_typesFM4add_v3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(*used_ids_0, ci_base_0,
               __fold_result___3 & 9223372036854775807ULL, 0), _fx_catch_3);
      }
      bool v_17;
      if (ci_vtbl_0->m > 0) {
         v_17 = true;
      }
      else {
         FX_CALL(_fx_M3AstFM2ppS1RM4id_t(ci_vtbl_0, &v_14, 0), _fx_catch_3);
         bool v_18;
         fx_str_t slit_4 = FX_MAKE_STR("fx_");
         v_18 = _fx_M6StringFM10startswithB2SS(&v_14, &slit_4, 0);
         v_17 = !v_18;
      }
      if (v_17) {
         uint64_t __fold_result___4 = 14695981039346656037ULL;
         uint64_t h_12 = __fold_result___4 ^ ((uint64_t)ci_vtbl_0->m ^ 14695981039346656037ULL);
         __fold_result___4 = h_12 * 1099511628211ULL;
         uint64_t h_13 = __fold_result___4 ^ ((uint64_t)ci_vtbl_0->i ^ 14695981039346656037ULL);
         __fold_result___4 = h_13 * 1099511628211ULL;
         uint64_t h_14 = __fold_result___4 ^ ((uint64_t)ci_vtbl_0->j ^ 14695981039346656037ULL);
         __fold_result___4 = h_14 * 1099511628211ULL;
         FX_CALL(
            _fx_M11C_gen_typesFM4add_v3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(*used_ids_0, ci_vtbl_0,
               __fold_result___4 & 9223372036854775807ULL, 0), _fx_catch_3);
      }

   _fx_catch_3: ;
      FX_FREE_STR(&v_14);
      FX_FREE_STR(&v_13);
      _fx_free_R23C_form__cdefinterface_t(&v_12);
   }
   else if (tag_0 == 20) {
      fx_str_t v_19 = {0};
      _fx_R9Ast__id_t* n_0 = &s_0->u.CDefForwardTyp.t0;
      bool v_20;
      if (n_0->m > 0) {
         v_20 = true;
      }
      else {
         FX_CALL(_fx_M3AstFM2ppS1RM4id_t(n_0, &v_19, 0), _fx_catch_4);
         bool v_21;
         fx_str_t slit_5 = FX_MAKE_STR("fx_");
         v_21 = _fx_M6StringFM10startswithB2SS(&v_19, &slit_5, 0);
         v_20 = !v_21;
      }
      if (v_20) {
         uint64_t __fold_result___5 = 14695981039346656037ULL;
         uint64_t h_15 = __fold_result___5 ^ ((uint64_t)n_0->m ^ 14695981039346656037ULL);
         __fold_result___5 = h_15 * 1099511628211ULL;
         uint64_t h_16 = __fold_result___5 ^ ((uint64_t)n_0->i ^ 14695981039346656037ULL);
         __fold_result___5 = h_16 * 1099511628211ULL;
         uint64_t h_17 = __fold_result___5 ^ ((uint64_t)n_0->j ^ 14695981039346656037ULL);
         __fold_result___5 = h_17 * 1099511628211ULL;
         FX_CALL(
            _fx_M11C_gen_typesFM4add_v3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(*used_ids_0, n_0,
               __fold_result___5 & 9223372036854775807ULL, 0), _fx_catch_4);
      }

   _fx_catch_4: ;
      FX_FREE_STR(&v_19);
   }
   else if (tag_0 != 21) {

   }

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M11C_gen_typesFM7make_fpFPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t1rNt10Hashset__t1R9Ast__id_t(
   struct _fx_rNt10Hashset__t1R9Ast__id_t_data_t* arg0,
   struct _fx_FPv2N15C_form__cstmt_tR22C_form__c_fold_callb_t* fx_result)
{
   FX_MAKE_FP_IMPL_START(_fx_M11C_gen_typesFM17used_ids_by_cstmtv2N15C_form__cstmt_tR22C_form__c_fold_callb_t_cldata_t,
      _fx_free_M11C_gen_typesFM17used_ids_by_cstmtv2N15C_form__cstmt_tR22C_form__c_fold_callb_t,
      _fx_M11C_gen_typesFM17used_ids_by_cstmtv2N15C_form__cstmt_tR22C_form__c_fold_callb_t);
   FX_COPY_PTR(arg0, &fcv->t0);
   return 0;
}

FX_EXTERN_C int
   _fx_M11C_gen_typesFM18elim_unused_ctypesLN15C_form__cstmt_t5R9Ast__id_tLN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_tLN15C_form__cstmt_t(
   struct _fx_R9Ast__id_t* mname_0,
   struct _fx_LN15C_form__cstmt_t_data_t* all_ctypes_fwd_decl_0,
   struct _fx_LN15C_form__cstmt_t_data_t* all_ctypes_decl_0,
   struct _fx_LN15C_form__cstmt_t_data_t* all_ctypes_fun_decl_0,
   struct _fx_LN15C_form__cstmt_t_data_t* ccode_0,
   struct _fx_LN15C_form__cstmt_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_Nt10Hashset__t1S used_names_0 = 0;
   _fx_Nt10Hashset__t1S used_fwd_names_0 = 0;
   _fx_Nt10Hashset__t1R9Ast__id_t used_ids_0 = 0;
   _fx_LN15C_form__cstmt_t __fold_result___0 = 0;
   _fx_LN15C_form__cstmt_t v_0 = 0;
   _fx_LN15C_form__cstmt_t v_1 = 0;
   _fx_LN15C_form__cstmt_t ctypes_ccode_0 = 0;
   _fx_LN15C_form__cstmt_t __fold_result___1 = 0;
   int fx_status = 0;
   FX_CALL(_fx_M3AstFM17empty_str_hashsetNt10Hashset__t1S1i(1024, &used_names_0, 0), _fx_cleanup);
   FX_CALL(_fx_M3AstFM17empty_str_hashsetNt10Hashset__t1S1i(1024, &used_fwd_names_0, 0), _fx_cleanup);
   FX_CALL(
      _fx_M11C_gen_typesFM17used_ids_by_ccodeNt10Hashset__t1R9Ast__id_t2LN15C_form__cstmt_ti(ccode_0, 1024, &used_ids_0, 0),
      _fx_cleanup);
   FX_CALL(
      _fx_M11C_gen_typesFM15update_used_idsv5Nt10Hashset__t1R9Ast__id_tLN15C_form__cstmt_tR9Ast__id_tNt10Hashset__t1SNt10Hashset__t1S(
         used_ids_0, all_ctypes_decl_0, mname_0, used_fwd_names_0, used_names_0, 0), _fx_cleanup);
   if (all_ctypes_decl_0 == 0) {
      FX_COPY_PTR(all_ctypes_fun_decl_0, &v_0);
   }
   else if (all_ctypes_fun_decl_0 == 0) {
      FX_COPY_PTR(all_ctypes_decl_0, &v_0);
   }
   else {
      _fx_LN15C_form__cstmt_t v_2 = 0;
      _fx_LN15C_form__cstmt_t lstend_0 = 0;
      _fx_LN15C_form__cstmt_t lst_0 = all_ctypes_decl_0;
      for (; lst_0; lst_0 = lst_0->tl) {
         _fx_N15C_form__cstmt_t x_0 = lst_0->hd;
         _fx_LN15C_form__cstmt_t node_0 = 0;
         FX_CALL(_fx_cons_LN15C_form__cstmt_t(x_0, 0, false, &node_0), _fx_catch_0);
         FX_LIST_APPEND(v_2, lstend_0, node_0);

      _fx_catch_0: ;
         FX_CHECK_EXN(_fx_catch_1);
      }
      _fx_M11C_gen_typesFM5link2LN15C_form__cstmt_t2LN15C_form__cstmt_tLN15C_form__cstmt_t(v_2, all_ctypes_fun_decl_0, &v_0, 0);

   _fx_catch_1: ;
      if (v_2) {
         _fx_free_LN15C_form__cstmt_t(&v_2);
      }
   }
   FX_CHECK_EXN(_fx_cleanup);
   if (all_ctypes_fwd_decl_0 == 0) {
      FX_COPY_PTR(v_0, &v_1);
   }
   else if (v_0 == 0) {
      FX_COPY_PTR(all_ctypes_fwd_decl_0, &v_1);
   }
   else {
      _fx_LN15C_form__cstmt_t v_3 = 0;
      _fx_LN15C_form__cstmt_t lstend_1 = 0;
      _fx_LN15C_form__cstmt_t lst_1 = all_ctypes_fwd_decl_0;
      for (; lst_1; lst_1 = lst_1->tl) {
         _fx_N15C_form__cstmt_t x_1 = lst_1->hd;
         _fx_LN15C_form__cstmt_t node_1 = 0;
         FX_CALL(_fx_cons_LN15C_form__cstmt_t(x_1, 0, false, &node_1), _fx_catch_2);
         FX_LIST_APPEND(v_3, lstend_1, node_1);

      _fx_catch_2: ;
         FX_CHECK_EXN(_fx_catch_3);
      }
      _fx_M11C_gen_typesFM5link2LN15C_form__cstmt_t2LN15C_form__cstmt_tLN15C_form__cstmt_t(v_3, v_0, &v_1, 0);

   _fx_catch_3: ;
      if (v_3) {
         _fx_free_LN15C_form__cstmt_t(&v_3);
      }
   }
   FX_CHECK_EXN(_fx_cleanup);
   _fx_LN15C_form__cstmt_t lst_2 = v_1;
   for (; lst_2; lst_2 = lst_2->tl) {
      _fx_LN15C_form__cstmt_t ctypes_ccode_1 = 0;
      _fx_LN15C_form__cstmt_t v_4 = 0;
      _fx_N15C_form__cstmt_t s_0 = lst_2->hd;
      FX_COPY_PTR(__fold_result___0, &ctypes_ccode_1);
      bool v_5;
      FX_CALL(
         _fx_M11C_gen_typesFM12is_used_declB5N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_tBNt10Hashset__t1SNt10Hashset__t1S(s_0,
            used_ids_0, true, used_fwd_names_0, used_names_0, &v_5, 0), _fx_catch_4);
      if (v_5) {
         FX_CALL(_fx_cons_LN15C_form__cstmt_t(s_0, ctypes_ccode_1, true, &v_4), _fx_catch_4);
      }
      else {
         FX_COPY_PTR(ctypes_ccode_1, &v_4);
      }
      _fx_free_LN15C_form__cstmt_t(&__fold_result___0);
      FX_COPY_PTR(v_4, &__fold_result___0);

   _fx_catch_4: ;
      if (v_4) {
         _fx_free_LN15C_form__cstmt_t(&v_4);
      }
      if (ctypes_ccode_1) {
         _fx_free_LN15C_form__cstmt_t(&ctypes_ccode_1);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }
   FX_COPY_PTR(__fold_result___0, &ctypes_ccode_0);
   _fx_LN15C_form__cstmt_t lst_3 = ctypes_ccode_0;
   for (; lst_3; lst_3 = lst_3->tl) {
      _fx_LN15C_form__cstmt_t r_0 = 0;
      _fx_N15C_form__cstmt_t a_0 = lst_3->hd;
      FX_COPY_PTR(__fold_result___1, &r_0);
      FX_CALL(_fx_cons_LN15C_form__cstmt_t(a_0, r_0, false, &r_0), _fx_catch_5);
      _fx_free_LN15C_form__cstmt_t(&__fold_result___1);
      FX_COPY_PTR(r_0, &__fold_result___1);

   _fx_catch_5: ;
      if (r_0) {
         _fx_free_LN15C_form__cstmt_t(&r_0);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }
   FX_COPY_PTR(__fold_result___1, fx_result);

_fx_cleanup: ;
   if (used_names_0) {
      _fx_free_Nt10Hashset__t1S(&used_names_0);
   }
   if (used_fwd_names_0) {
      _fx_free_Nt10Hashset__t1S(&used_fwd_names_0);
   }
   if (used_ids_0) {
      _fx_free_Nt10Hashset__t1R9Ast__id_t(&used_ids_0);
   }
   if (__fold_result___0) {
      _fx_free_LN15C_form__cstmt_t(&__fold_result___0);
   }
   if (v_0) {
      _fx_free_LN15C_form__cstmt_t(&v_0);
   }
   if (v_1) {
      _fx_free_LN15C_form__cstmt_t(&v_1);
   }
   if (ctypes_ccode_0) {
      _fx_free_LN15C_form__cstmt_t(&ctypes_ccode_0);
   }
   if (__fold_result___1) {
      _fx_free_LN15C_form__cstmt_t(&__fold_result___1);
   }
   return fx_status;
}

static int _fx_M11C_gen_typesFM12is_used_declB5N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_tBNt10Hashset__t1SNt10Hashset__t1S(
   struct _fx_N15C_form__cstmt_t_data_t* s_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* used_ids_0,
   bool final_0,
   struct _fx_Nt10Hashset__t1S_data_t* used_fwd_names_0,
   struct _fx_Nt10Hashset__t1S_data_t* used_names_0,
   bool* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   int tag_0 = FX_REC_VARIANT_TAG(s_0);
   if (tag_0 == 18) {
      _fx_R17C_form__cdeftyp_t v_0 = {0};
      _fx_N14C_form__ctyp_t t_0 = 0;
      _fx_copy_R17C_form__cdeftyp_t(&s_0->u.CDefTyp->data, &v_0);
      fx_str_t* ct_cname_0 = &v_0.ct_cname;
      _fx_R9Ast__id_t* ct_name_0 = &v_0.ct_name;
      uint64_t __fold_result___0 = 14695981039346656037ULL;
      uint64_t h_0 = __fold_result___0 ^ ((uint64_t)ct_name_0->m ^ 14695981039346656037ULL);
      __fold_result___0 = h_0 * 1099511628211ULL;
      uint64_t h_1 = __fold_result___0 ^ ((uint64_t)ct_name_0->i ^ 14695981039346656037ULL);
      __fold_result___0 = h_1 * 1099511628211ULL;
      uint64_t h_2 = __fold_result___0 ^ ((uint64_t)ct_name_0->j ^ 14695981039346656037ULL);
      __fold_result___0 = h_2 * 1099511628211ULL;
      _fx_Ta2i v_1;
      FX_CALL(
         _fx_M11C_gen_typesFM9find_idx_Ta2i3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(used_ids_0, ct_name_0,
            __fold_result___0 & 9223372036854775807ULL, &v_1, 0), _fx_catch_5);
      bool t_1;
      if (v_1.t1 >= 0) {
         t_1 = true;
      }
      else {
         _fx_R9Ast__id_t result_0 = {0};
         FX_COPY_PTR(v_0.ct_typ, &t_0);
         for (;;) {
            _fx_N14C_form__ctyp_t t_2 = 0;
            FX_COPY_PTR(t_0, &t_2);
            int tag_1 = FX_REC_VARIANT_TAG(t_2);
            if (tag_1 == 21) {
               result_0 = t_2->u.CTypName; FX_BREAK(_fx_catch_0);  _fx_catch_0: ; goto _fx_endmatch_0;
            }
            if (tag_1 == 14) {
               _fx_Nt6option1R9Ast__id_t* v_2 = &t_2->u.CTypStruct.t0;
               if (v_2->tag == 2) {
                  result_0 = v_2->u.Some; FX_BREAK(_fx_catch_1);  _fx_catch_1: ; goto _fx_endmatch_0;
               }
            }
            if (tag_1 == 15) {
               _fx_Nt6option1R9Ast__id_t* v_3 = &t_2->u.CTypUnion.t0;
               if (v_3->tag == 2) {
                  result_0 = v_3->u.Some; FX_BREAK(_fx_catch_2);  _fx_catch_2: ; goto _fx_endmatch_0;
               }
            }
            if (tag_1 == 17) {
               _fx_N14C_form__ctyp_t* t_3 = &t_2->u.CTypRawPtr.t1;
               _fx_free_N14C_form__ctyp_t(&t_0);
               FX_COPY_PTR(*t_3, &t_0);
               goto _fx_endmatch_0;
            }
            result_0 = _fx_g9Ast__noid;
            FX_BREAK(_fx_catch_3);

         _fx_catch_3: ;

         _fx_endmatch_0: ;
            FX_CHECK_EXN(_fx_catch_4);

         _fx_catch_4: ;
            if (t_2) {
               _fx_free_N14C_form__ctyp_t(&t_2);
            }
            FX_CHECK_BREAK();
            FX_CHECK_EXN(_fx_catch_5);
         }
         _fx_R9Ast__id_t v_4 = result_0;
         uint64_t __fold_result___1 = 14695981039346656037ULL;
         uint64_t h_3 = __fold_result___1 ^ ((uint64_t)v_4.m ^ 14695981039346656037ULL);
         __fold_result___1 = h_3 * 1099511628211ULL;
         uint64_t h_4 = __fold_result___1 ^ ((uint64_t)v_4.i ^ 14695981039346656037ULL);
         __fold_result___1 = h_4 * 1099511628211ULL;
         uint64_t h_5 = __fold_result___1 ^ ((uint64_t)v_4.j ^ 14695981039346656037ULL);
         __fold_result___1 = h_5 * 1099511628211ULL;
         _fx_Ta2i v_5;
         FX_CALL(
            _fx_M11C_gen_typesFM9find_idx_Ta2i3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(used_ids_0, &v_4,
               __fold_result___1 & 9223372036854775807ULL, &v_5, 0), _fx_catch_5);
         t_1 = v_5.t1 >= 0;
      }
      if (t_1) {
         if (!final_0) {
            *fx_result = true;
         }
         else {
            uint64_t v_6 = _fx_F4hashq1S(ct_cname_0, 0);
            _fx_Ta2i v_7;
            FX_CALL(
               _fx_M11C_gen_typesFM9find_idx_Ta2i3Nt10Hashset__t1SSq(used_names_0, ct_cname_0, v_6 & 9223372036854775807ULL,
                  &v_7, 0), _fx_catch_5);
            bool found_0 = v_7.t1 >= 0;
            bool t_4;
            if (!found_0) {
               t_4 = FX_STR_LENGTH(*ct_cname_0) != 0;
            }
            else {
               t_4 = false;
            }
            if (t_4) {
               uint64_t v_8 = _fx_F4hashq1S(ct_cname_0, 0);
               FX_CALL(_fx_M11C_gen_typesFM4add_v3Nt10Hashset__t1SSq(used_names_0, ct_cname_0, v_8 & 9223372036854775807ULL, 0),
                  _fx_catch_5);
            }
            *fx_result = !found_0;
         }
      }
      else {
         *fx_result = false;
      }

   _fx_catch_5: ;
      if (t_0) {
         _fx_free_N14C_form__ctyp_t(&t_0);
      }
      _fx_free_R17C_form__cdeftyp_t(&v_0);
   }
   else if (tag_0 == 20) {
      fx_str_t v_9 = {0};
      _fx_T2R9Ast__id_tR10Ast__loc_t* vcase_0 = &s_0->u.CDefForwardTyp;
      _fx_R9Ast__id_t* tn_0 = &vcase_0->t0;
      uint64_t __fold_result___2 = 14695981039346656037ULL;
      uint64_t h_6 = __fold_result___2 ^ ((uint64_t)tn_0->m ^ 14695981039346656037ULL);
      __fold_result___2 = h_6 * 1099511628211ULL;
      uint64_t h_7 = __fold_result___2 ^ ((uint64_t)tn_0->i ^ 14695981039346656037ULL);
      __fold_result___2 = h_7 * 1099511628211ULL;
      uint64_t h_8 = __fold_result___2 ^ ((uint64_t)tn_0->j ^ 14695981039346656037ULL);
      __fold_result___2 = h_8 * 1099511628211ULL;
      _fx_Ta2i v_10;
      FX_CALL(
         _fx_M11C_gen_typesFM9find_idx_Ta2i3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(used_ids_0, tn_0,
            __fold_result___2 & 9223372036854775807ULL, &v_10, 0), _fx_catch_6);
      if (v_10.t1 >= 0) {
         if (!final_0) {
            *fx_result = true;
         }
         else {
            FX_CALL(_fx_M6C_formFM13get_idc_cnameS2R9Ast__id_tR10Ast__loc_t(tn_0, &vcase_0->t1, &v_9, 0), _fx_catch_6);
            uint64_t v_11 = _fx_F4hashq1S(&v_9, 0);
            _fx_Ta2i v_12;
            FX_CALL(
               _fx_M11C_gen_typesFM9find_idx_Ta2i3Nt10Hashset__t1SSq(used_fwd_names_0, &v_9, v_11 & 9223372036854775807ULL,
                  &v_12, 0), _fx_catch_6);
            bool found_1 = v_12.t1 >= 0;
            bool t_5;
            if (!found_1) {
               t_5 = FX_STR_LENGTH(v_9) != 0;
            }
            else {
               t_5 = false;
            }
            if (t_5) {
               uint64_t v_13 = _fx_F4hashq1S(&v_9, 0);
               FX_CALL(_fx_M11C_gen_typesFM4add_v3Nt10Hashset__t1SSq(used_fwd_names_0, &v_9, v_13 & 9223372036854775807ULL, 0),
                  _fx_catch_6);
            }
            *fx_result = !found_1;
         }
      }
      else {
         *fx_result = false;
      }

   _fx_catch_6: ;
      FX_FREE_STR(&v_9);
   }
   else if (tag_0 == 19) {
      fx_str_t v_14 = {0};
      _fx_T2R9Ast__id_tR10Ast__loc_t* vcase_1 = &s_0->u.CDefForwardSym;
      _fx_R9Ast__id_t* f_0 = &vcase_1->t0;
      bool res_0;
      FX_CALL(_fx_M11C_gen_typesFM3memB2Nt10Hashset__t1R9Ast__id_tR9Ast__id_t(used_ids_0, f_0, &res_0, 0), _fx_catch_7);
      if (res_0) {
         if (!final_0) {
            *fx_result = true;
         }
         else {
            FX_CALL(_fx_M6C_formFM13get_idc_cnameS2R9Ast__id_tR10Ast__loc_t(f_0, &vcase_1->t1, &v_14, 0), _fx_catch_7);
            uint64_t v_15 = _fx_F4hashq1S(&v_14, 0);
            _fx_Ta2i v_16;
            FX_CALL(
               _fx_M11C_gen_typesFM9find_idx_Ta2i3Nt10Hashset__t1SSq(used_fwd_names_0, &v_14, v_15 & 9223372036854775807ULL,
                  &v_16, 0), _fx_catch_7);
            bool found_2 = v_16.t1 >= 0;
            bool t_6;
            if (!found_2) {
               t_6 = FX_STR_LENGTH(v_14) != 0;
            }
            else {
               t_6 = false;
            }
            if (t_6) {
               uint64_t v_17 = _fx_F4hashq1S(&v_14, 0);
               FX_CALL(_fx_M11C_gen_typesFM4add_v3Nt10Hashset__t1SSq(used_fwd_names_0, &v_14, v_17 & 9223372036854775807ULL, 0),
                  _fx_catch_7);
            }
            *fx_result = !found_2;
         }
      }
      else {
         *fx_result = false;
      }

   _fx_catch_7: ;
      FX_FREE_STR(&v_14);
   }
   else if (tag_0 == 17) {
      _fx_R17C_form__cdeffun_t v_18 = {0};
      _fx_copy_R17C_form__cdeffun_t(&s_0->u.CDefFun->data, &v_18);
      fx_str_t* cf_cname_0 = &v_18.cf_cname;
      bool res_1;
      FX_CALL(_fx_M11C_gen_typesFM3memB2Nt10Hashset__t1R9Ast__id_tR9Ast__id_t(used_ids_0, &v_18.cf_name, &res_1, 0),
         _fx_catch_8);
      if (res_1) {
         if (!final_0) {
            *fx_result = true;
         }
         else {
            uint64_t v_19 = _fx_F4hashq1S(cf_cname_0, 0);
            _fx_Ta2i v_20;
            FX_CALL(
               _fx_M11C_gen_typesFM9find_idx_Ta2i3Nt10Hashset__t1SSq(used_names_0, cf_cname_0, v_19 & 9223372036854775807ULL,
                  &v_20, 0), _fx_catch_8);
            bool found_3 = v_20.t1 >= 0;
            bool t_7;
            if (!found_3) {
               t_7 = FX_STR_LENGTH(*cf_cname_0) != 0;
            }
            else {
               t_7 = false;
            }
            if (t_7) {
               uint64_t v_21 = _fx_F4hashq1S(cf_cname_0, 0);
               FX_CALL(
                  _fx_M11C_gen_typesFM4add_v3Nt10Hashset__t1SSq(used_names_0, cf_cname_0, v_21 & 9223372036854775807ULL, 0),
                  _fx_catch_8);
            }
            *fx_result = !found_3;
         }
      }
      else {
         *fx_result = false;
      }

   _fx_catch_8: ;
      _fx_free_R17C_form__cdeffun_t(&v_18);
   }
   else if (tag_0 == 21) {
      _fx_R18C_form__cdefenum_t v_22 = {0};
      _fx_LT2R9Ast__id_tNt6option1N14C_form__cexp_t cenum_members_0 = 0;
      _fx_copy_R18C_form__cdefenum_t(&s_0->u.CDefEnum->data, &v_22);
      fx_str_t* cenum_cname_0 = &v_22.cenum_cname;
      bool res_2;
      FX_CALL(_fx_M11C_gen_typesFM3memB2Nt10Hashset__t1R9Ast__id_tR9Ast__id_t(used_ids_0, &v_22.cenum_name, &res_2, 0),
         _fx_catch_10);
      bool t_8;
      if (res_2) {
         t_8 = true;
      }
      else {
         bool __fold_result___3 = false;
         FX_COPY_PTR(v_22.cenum_members, &cenum_members_0);
         _fx_LT2R9Ast__id_tNt6option1N14C_form__cexp_t lst_0 = cenum_members_0;
         for (; lst_0; lst_0 = lst_0->tl) {
            _fx_T2R9Ast__id_tNt6option1N14C_form__cexp_t* a_0 = &lst_0->hd;
            bool v_23;
            FX_CALL(
               _fx_M11C_gen_typesFM10__lambda__B2T2R9Ast__id_tNt6option1N14C_form__cexp_tNt10Hashset__t1R9Ast__id_t(a_0,
                  used_ids_0, &v_23, 0), _fx_catch_9);
            if (v_23) {
               __fold_result___3 = true; FX_BREAK(_fx_catch_9);
            }

         _fx_catch_9: ;
            FX_CHECK_BREAK();
            FX_CHECK_EXN(_fx_catch_10);
         }
         t_8 = __fold_result___3;
      }
      if (t_8) {
         if (!final_0) {
            *fx_result = true;
         }
         else {
            uint64_t v_24 = _fx_F4hashq1S(cenum_cname_0, 0);
            _fx_Ta2i v_25;
            FX_CALL(
               _fx_M11C_gen_typesFM9find_idx_Ta2i3Nt10Hashset__t1SSq(used_names_0, cenum_cname_0, v_24 & 9223372036854775807ULL,
                  &v_25, 0), _fx_catch_10);
            bool found_4 = v_25.t1 >= 0;
            bool t_9;
            if (!found_4) {
               t_9 = FX_STR_LENGTH(*cenum_cname_0) != 0;
            }
            else {
               t_9 = false;
            }
            if (t_9) {
               uint64_t v_26 = _fx_F4hashq1S(cenum_cname_0, 0);
               FX_CALL(
                  _fx_M11C_gen_typesFM4add_v3Nt10Hashset__t1SSq(used_names_0, cenum_cname_0, v_26 & 9223372036854775807ULL, 0),
                  _fx_catch_10);
            }
            *fx_result = !found_4;
         }
      }
      else {
         *fx_result = false;
      }

   _fx_catch_10: ;
      if (cenum_members_0) {
         _fx_free_LT2R9Ast__id_tNt6option1N14C_form__cexp_t(&cenum_members_0);
      }
      _fx_free_R18C_form__cdefenum_t(&v_22);
   }
   else if (tag_0 == 22) {
      _fx_R23C_form__cdefinterface_t v_27 = {0};
      _fx_copy_R23C_form__cdefinterface_t(&s_0->u.CDefInterface->data, &v_27);
      fx_str_t* ci_cname_0 = &v_27.ci_cname;
      bool res_3;
      FX_CALL(_fx_M11C_gen_typesFM3memB2Nt10Hashset__t1R9Ast__id_tR9Ast__id_t(used_ids_0, &v_27.ci_name, &res_3, 0),
         _fx_catch_11);
      if (res_3) {
         if (!final_0) {
            *fx_result = true;
         }
         else {
            uint64_t v_28 = _fx_F4hashq1S(ci_cname_0, 0);
            _fx_Ta2i v_29;
            FX_CALL(
               _fx_M11C_gen_typesFM9find_idx_Ta2i3Nt10Hashset__t1SSq(used_names_0, ci_cname_0, v_28 & 9223372036854775807ULL,
                  &v_29, 0), _fx_catch_11);
            bool found_5 = v_29.t1 >= 0;
            bool t_10;
            if (!found_5) {
               t_10 = FX_STR_LENGTH(*ci_cname_0) != 0;
            }
            else {
               t_10 = false;
            }
            if (t_10) {
               uint64_t v_30 = _fx_F4hashq1S(ci_cname_0, 0);
               FX_CALL(
                  _fx_M11C_gen_typesFM4add_v3Nt10Hashset__t1SSq(used_names_0, ci_cname_0, v_30 & 9223372036854775807ULL, 0),
                  _fx_catch_11);
            }
            *fx_result = !found_5;
         }
      }
      else {
         *fx_result = false;
      }

   _fx_catch_11: ;
      _fx_free_R23C_form__cdefinterface_t(&v_27);
   }
   else {
      *fx_result = false;
   }
   return fx_status;
}

static int _fx_M11C_gen_typesFM10__lambda__B2T2R9Ast__id_tNt6option1N14C_form__cexp_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_T2R9Ast__id_tNt6option1N14C_form__cexp_t* arg0_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* used_ids_0,
   bool* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   _fx_R9Ast__id_t m_0 = arg0_0->t0;
   uint64_t __fold_result___0 = 14695981039346656037ULL;
   uint64_t h_0 = __fold_result___0 ^ ((uint64_t)m_0.m ^ 14695981039346656037ULL);
   __fold_result___0 = h_0 * 1099511628211ULL;
   uint64_t h_1 = __fold_result___0 ^ ((uint64_t)m_0.i ^ 14695981039346656037ULL);
   __fold_result___0 = h_1 * 1099511628211ULL;
   uint64_t h_2 = __fold_result___0 ^ ((uint64_t)m_0.j ^ 14695981039346656037ULL);
   __fold_result___0 = h_2 * 1099511628211ULL;
   _fx_Ta2i v_0;
   FX_CALL(
      _fx_M11C_gen_typesFM9find_idx_Ta2i3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(used_ids_0, &m_0,
         __fold_result___0 & 9223372036854775807ULL, &v_0, 0), _fx_cleanup);
   *fx_result = v_0.t1 >= 0;

_fx_cleanup: ;
   return fx_status;
}

static int
   _fx_M11C_gen_typesFM15update_used_idsv5Nt10Hashset__t1R9Ast__id_tLN15C_form__cstmt_tR9Ast__id_tNt10Hashset__t1SNt10Hashset__t1S(
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* used_ids_0,
   struct _fx_LN15C_form__cstmt_t_data_t* all_ctypes_decl_0,
   struct _fx_R9Ast__id_t* mname_0,
   struct _fx_Nt10Hashset__t1S_data_t* used_fwd_names_0,
   struct _fx_Nt10Hashset__t1S_data_t* used_names_0,
   void* fx_fv)
{
   _fx_LT2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t decls_plus_0 = 0;
   fx_str_t v_0 = {0};
   fx_str_t v_1 = {0};
   fx_exn_t v_2 = {0};
   int fx_status = 0;
   _fx_LT2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t lstend_0 = 0;
   _fx_LN15C_form__cstmt_t lst_0 = all_ctypes_decl_0;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_LN15C_form__cstmt_t v_3 = 0;
      _fx_Nt10Hashset__t1R9Ast__id_t uv_0 = 0;
      _fx_T2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t tup_0 = {0};
      _fx_N15C_form__cstmt_t s_0 = lst_0->hd;
      FX_CALL(_fx_cons_LN15C_form__cstmt_t(s_0, 0, true, &v_3), _fx_catch_0);
      FX_CALL(_fx_M11C_gen_typesFM17used_ids_by_ccodeNt10Hashset__t1R9Ast__id_t2LN15C_form__cstmt_ti(v_3, 8, &uv_0, 0),
         _fx_catch_0);
      _fx_make_T2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t(s_0, uv_0, &tup_0);
      _fx_LT2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t node_0 = 0;
      FX_CALL(_fx_cons_LT2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t(&tup_0, 0, false, &node_0), _fx_catch_0);
      FX_LIST_APPEND(decls_plus_0, lstend_0, node_0);

   _fx_catch_0: ;
      _fx_free_T2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t(&tup_0);
      if (uv_0) {
         _fx_free_Nt10Hashset__t1R9Ast__id_t(&uv_0);
      }
      if (v_3) {
         _fx_free_LN15C_form__cstmt_t(&v_3);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }
   bool done_0 = false;
   for (int_ i_0 = 0; i_0 < 100; i_0++) {
      int_ size0_0 = used_ids_0->u.t.t1;
      _fx_LT2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t lst_1 = decls_plus_0;
      for (; lst_1; lst_1 = lst_1->tl) {
         _fx_N15C_form__cstmt_t s_1 = 0;
         _fx_Nt10Hashset__t1R9Ast__id_t uv_1 = 0;
         fx_arr_t table_0 = {0};
         _fx_T2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t* __pat___0 = &lst_1->hd;
         FX_COPY_PTR(__pat___0->t0, &s_1);
         FX_COPY_PTR(__pat___0->t1, &uv_1);
         bool v_4;
         FX_CALL(
            _fx_M11C_gen_typesFM12is_used_declB5N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_tBNt10Hashset__t1SNt10Hashset__t1S(
               s_1, used_ids_0, false, used_fwd_names_0, used_names_0, &v_4, 0), _fx_catch_2);
         if (v_4) {
            fx_copy_arr(&uv_1->u.t.t5, &table_0);
            int_ v_5 = uv_1->u.t.t2;
            for (int_ j_0 = 0; j_0 < v_5; j_0++) {
               FX_CHKIDX(FX_CHKIDX1(table_0, 0, j_0), _fx_catch_1);
               if (FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, table_0, j_0)->hv < 9223372036854775808ULL) {
                  FX_CHKIDX(FX_CHKIDX1(table_0, 0, j_0), _fx_catch_1);
                  _fx_R9Ast__id_t v_6 = FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, table_0, j_0)->key;
                  FX_CHKIDX(FX_CHKIDX1(table_0, 0, j_0), _fx_catch_1);
                  FX_CALL(
                     _fx_M11C_gen_typesFM4add_v3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(used_ids_0, &v_6,
                        FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, table_0, j_0)->hv, 0), _fx_catch_1);
               }

            _fx_catch_1: ;
               FX_CHECK_EXN(_fx_catch_2);
            }
         }

      _fx_catch_2: ;
         FX_FREE_ARR(&table_0);
         if (uv_1) {
            _fx_free_Nt10Hashset__t1R9Ast__id_t(&uv_1);
         }
         if (s_1) {
            _fx_free_N15C_form__cstmt_t(&s_1);
         }
         FX_CHECK_EXN(_fx_catch_3);
      }
      if (used_ids_0->u.t.t1 == size0_0) {
         done_0 = true; FX_BREAK(_fx_catch_3);
      }

   _fx_catch_3: ;
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   if (!done_0) {
      FX_CALL(_fx_M3AstFM2ppS1RM4id_t(mname_0, &v_0, 0), _fx_cleanup);
      fx_str_t slit_0 = FX_MAKE_STR(": too many iterations in update_used_ctypes_");
      {
         const fx_str_t strs_0[] = { v_0, slit_0 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 2, &v_1), _fx_cleanup);
      }
      FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(&_fx_g10Ast__noloc, &v_1, &v_2, 0), _fx_cleanup);
      FX_THROW(&v_2, false, _fx_cleanup);
   }

_fx_cleanup: ;
   if (decls_plus_0) {
      _fx_free_LT2N15C_form__cstmt_tNt10Hashset__t1R9Ast__id_t(&decls_plus_0);
   }
   FX_FREE_STR(&v_0);
   FX_FREE_STR(&v_1);
   fx_free_exn(&v_2);
   return fx_status;
}

FX_EXTERN_C int fx_init_C_gen_types(void)
{
   int fx_status = 0;
   return fx_status;
}

FX_EXTERN_C void fx_deinit_C_gen_types(void)
{

}

